Skip to content

Commit

Permalink
fix changing directory in start_global_shell.sh (#25)
Browse files Browse the repository at this point in the history
* fix changing directory in start_global_shell.sh

* add success message
  • Loading branch information
master-hax authored Oct 25, 2024
1 parent 7bf224c commit 62ca910
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/start_global_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
# Usage: ./start_global_shell.sh
################################################################################

# TODO: return to current directory
# TODO: display success message

if [ "$(readlink /proc/self/ns/mnt)" != "$(readlink /proc/1/ns/mnt)" ]; then
nsenter -t 1 -m -- /bin/sh
nsenter -t 1 -m -- /bin/sh -c "cd $PWD && echo 'now running in global mount namespace' && /bin/sh"
else
echo 'already running in global mount namespace'
fi

0 comments on commit 62ca910

Please sign in to comment.