fix sudo value

This commit is contained in:
2023-07-11 10:01:06 +00:00
parent abfbeb2291
commit 7483784ead
2 changed files with 4 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ OSTYPE|PATH|PIPESTATUS|POSIXLY_CORRECT|PPID|PS1|PS4|\
SHELL|SHELLOPTS|SHLVL|SYSTEMD_PID|UID|USER|_)(=|\$)" > "$HOME/.systemd-env" SHELL|SHELLOPTS|SHLVL|SYSTEMD_PID|UID|USER|_)(=|\$)" > "$HOME/.systemd-env"
export PRE_NAMESPACE_PATH="$PATH" export PRE_NAMESPACE_PATH="$PATH"
export PRE_NAMESPACE_PWD="$(pwd)" export PRE_NAMESPACE_PWD="$(pwd)"
exec $SUDO_CMD /usr/local/bin/enter-systemd-namespace "$BASH_EXECUTION_STRING" exec sudo /usr/local/bin/enter-systemd-namespace "$BASH_EXECUTION_STRING"
fi fi
if [ -n "$PRE_NAMESPACE_PATH" ]; then if [ -n "$PRE_NAMESPACE_PATH" ]; then
export PATH="$PRE_NAMESPACE_PATH" export PATH="$PRE_NAMESPACE_PATH"

View File

@@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
$SUDO_CMD="sudo"
#echo "SUDO_CMD: $SUDO_CMD";
if [ "$1" != "--force" ]; then if [ "$1" != "--force" ]; then
if [ -f /usr/local/bin/start-systemd-namespace ]; then if [ -f /usr/local/bin/start-systemd-namespace ]; then
echo "It appears you have already installed the systemd hack." echo "It appears you have already installed the systemd hack."