From: Michael Fritch Date: Mon, 11 May 2020 22:30:34 +0000 (-0600) Subject: cephadm: fix shell mount for special files X-Git-Tag: wip-pdonnell-testing-20200918.022351~1279^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=72ae06f117d50009baf1dbddacd0805d419f76bc;p=ceph-ci.git cephadm: fix shell mount for special files block/char devs, named pipes, sockets etc Signed-off-by: Michael Fritch --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 8c47c443299..57d4b556d13 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