From cf010332cc53062694a9f86b3ae61b54db034b79 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 27 May 2018 10:48:34 +0200 Subject: Setting dummy SSH_CLIENT variable during container enter to enable conditional shell prompts such as powerline. Signed-off-by: Daniel Baumann --- lib/container/enter | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.3