From: Sage Weil Date: Fri, 8 Nov 2019 20:17:17 +0000 (-0600) Subject: ceph-daemon: customize the bash prompt for shell + enter X-Git-Tag: v15.1.0~971^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bab40e266977e3537cc82aabfcb3dfa6ca25d013;p=ceph.git ceph-daemon: customize the bash prompt for shell + enter [ceph: root@gnit /]# Signed-off-by: Sage Weil --- diff --git a/src/ceph-daemon/ceph-daemon b/src/ceph-daemon/ceph-daemon index 12880395985ee..8f2c94ec921f8 100755 --- a/src/ceph-daemon/ceph-daemon +++ b/src/ceph-daemon/ceph-daemon @@ -8,6 +8,7 @@ UNIT_DIR='/etc/systemd/system' LOG_DIR_MODE=0o770 DATA_DIR_MODE=0o700 PODMAN_PREFERENCE = ['podman', 'docker'] # prefer podman to docker +CUSTOM_PS1='[ceph: \u@\h \W]\\$ ' """ You can invoke ceph-daemon in two ways: @@ -1204,6 +1205,7 @@ def command_shell(): podman_args += [ '-it', '--env', 'LANG=C', + '-e', "PS1=%s" % CUSTOM_PS1, ] c = CephContainer( image=args.image, @@ -1225,6 +1227,7 @@ def command_enter(): podman_args += [ '-it', '--env', 'LANG=C', + '-e', "PS1=%s" % CUSTOM_PS1, ] c = get_container(args.fsid, daemon_type, daemon_id, podman_args=podman_args)