Skip to content

Commit

Permalink
enhance start_global_shell.sh
Browse files Browse the repository at this point in the history
add visual indicator when exiting elevated shell + update emoji
  • Loading branch information
master-hax authored Nov 14, 2024
1 parent 148630d commit d5bb686
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/start_global_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d5bb686

Please sign in to comment.