From: Michael Fritch Date: Mon, 11 May 2020 22:30:34 +0000 (-0600) Subject: cephadm: fix shell mount for special files X-Git-Tag: v15.2.4~73^2~32 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cc287afbafc12bed936d8c3168d92cb8112aa5f7;p=ceph.git cephadm: fix shell mount for special files block/char devs, named pipes, sockets etc Signed-off-by: Michael Fritch (cherry picked from commit 72ae06f117d50009baf1dbddacd0805d419f76bc) --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index a77a99ab348..205a476fdd7 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -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