]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: customize the bash prompt for shell + enter 31498/head
authorSage Weil <sage@redhat.com>
Fri, 8 Nov 2019 20:17:17 +0000 (14:17 -0600)
committerSage Weil <sage@redhat.com>
Fri, 8 Nov 2019 20:17:17 +0000 (14:17 -0600)
[ceph: root@gnit /]#

Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-daemon/ceph-daemon

index 12880395985eeb71f2afaa221ec917a87fe7c541..8f2c94ec921f834a5c817eb08c1d4143be5aee14 100755 (executable)
@@ -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)