summaryrefslogtreecommitdiffstats
path: root/lib/container
diff options
context:
space:
mode:
Diffstat (limited to 'lib/container')
-rwxr-xr-xlib/container/enter8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/container/enter b/lib/container/enter
index 5d2d25c..72b3b1c 100755
--- a/lib/container/enter
+++ b/lib/container/enter
@@ -103,9 +103,17 @@ do
fi
done
+SSH_CLIENT="${SSH_CLIENT:-127.0.0.1 0 0}"
+
# Run
nsenter --all --target "${LEADER}" --wd="${MACHINES}/${NAME}/root" /usr/bin/script -c "/bin/bash -l" -q /dev/null
+case "${SSH_CLIENT}" in
+ 127.0.0.1*)
+ unset SSH_CLIENT
+ ;;
+esac
+
# Post hooks
for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
do