From d5bb686d3c0525674031d7a50ecdefaede66e0ac Mon Sep 17 00:00:00 2001 From: Vivek Date: Wed, 13 Nov 2024 19:33:54 -0800 Subject: [PATCH] enhance start_global_shell.sh add visual indicator when exiting elevated shell + update emoji --- scripts/start_global_shell.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/start_global_shell.sh b/scripts/start_global_shell.sh index 87f7a30..d69b63a 100644 --- a/scripts/start_global_shell.sh +++ b/scripts/start_global_shell.sh @@ -7,7 +7,13 @@ ################################################################################ if [ "$(readlink /proc/self/ns/mnt)" != "$(readlink /proc/1/ns/mnt)" ]; then - nsenter -t 1 -m -- /bin/sh -c "cd $PWD && echo 'now running in global mount namespace 👍' && /bin/sh" + nsenter -t 1 -m -- "$SHELL" -c \ +" + cd $PWD \ + && echo 'entering global mount namespace 🌐' \ + && $SHELL \ + && echo 'exiting global mount namespace 👋' \ +" else echo 'already running in global mount namespace 🤔' fi