]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: fix shell mount for special files
authorMichael Fritch <mfritch@suse.com>
Mon, 11 May 2020 22:30:34 +0000 (16:30 -0600)
committerMichael Fritch <mfritch@suse.com>
Tue, 12 May 2020 22:11:13 +0000 (16:11 -0600)
block/char devs, named pipes, sockets etc

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm

index 8c47c443299285857efd2ecfc04e885581d33cf8..57d4b556d13de32f60aaaf5f6419f7215620e026 100755 (executable)
@@ -2790,9 +2790,7 @@ def command_shell():
         mounts[pathify(args.keyring)] = '/etc/ceph/ceph.keyring:z'
     if args.mount:
         mount = pathify(args.mount)
-        filename = ''
-        if os.path.isfile(mount):
-            _, filename = os.path.split(mount)
+        filename = os.path.basename(mount)
         mounts[mount] = '/mnt/{}:z'.format(filename)
     if args.command:
         command = args.command