From bab40e266977e3537cc82aabfcb3dfa6ca25d013 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 8 Nov 2019 14:17:17 -0600 Subject: [PATCH] ceph-daemon: customize the bash prompt for shell + enter [ceph: root@gnit /]# Signed-off-by: Sage Weil --- src/ceph-daemon/ceph-daemon | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.39.5