diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-05-27 18:57:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-05-27 18:57:28 +0000 |
commit | ec02cf56078c58021d5fe33a738eb00cb0079f74 (patch) | |
tree | b36858f90ef583ac374fa75f4f531bb31c2350ef /lib/container/enter | |
parent | Releasing debian version 20180503-1. (diff) | |
download | open-infrastructure-compute-tools-ec02cf56078c58021d5fe33a738eb00cb0079f74.tar.xz open-infrastructure-compute-tools-ec02cf56078c58021d5fe33a738eb00cb0079f74.zip |
Merging upstream version 20180527.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/container/enter')
-rwxr-xr-x | lib/container/enter | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/container/enter b/lib/container/enter index faf5d35..72b3b1c 100755 --- a/lib/container/enter +++ b/lib/container/enter @@ -103,15 +103,16 @@ do fi done +SSH_CLIENT="${SSH_CLIENT:-127.0.0.1 0 0}" + # Run -if [ -e "${MACHINES}/${NAME}/usr/bin/container-nsenter" ] -then - OPTIONS="/usr/bin/container-nsenter" -else - OPTIONS="" -fi +nsenter --all --target "${LEADER}" --wd="${MACHINES}/${NAME}/root" /usr/bin/script -c "/bin/bash -l" -q /dev/null -nsenter --target ${LEADER} --mount --uts --ipc --net --pid --root --wd=/root ${OPTIONS} +case "${SSH_CLIENT}" in + 127.0.0.1*) + unset SSH_CLIENT + ;; +esac # Post hooks for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}" |