From 89567348e7181a24ba3bdfc0575880420e1d22f9 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 14 Sep 2023 11:28:58 +0200 Subject: [PATCH] explicit check on archboot environment --- .../archboot/base/etc/profile.d/custom-bash-options.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/share/archboot/base/etc/profile.d/custom-bash-options.sh b/usr/share/archboot/base/etc/profile.d/custom-bash-options.sh index 266e42db4..27ca7b35f 100644 --- a/usr/share/archboot/base/etc/profile.d/custom-bash-options.sh +++ b/usr/share/archboot/base/etc/profile.d/custom-bash-options.sh @@ -22,11 +22,11 @@ if command -v nvim >/dev/null; then alias edit='nvim' fi # show MOTD on ttyd login -if [[ -z "${TTY}" && -z "${SSH_TTY}" && -z "${TMUX}" ]]; then +if [[ -z "${TTY}" && -z "${SSH_TTY}" && -z "${TMUX}" && "$(grep -w 'archboot' /etc/hostname)" ]]; then [[ "${SHLVL}" == "2" ]] && cat /etc/motd fi # run remote-login.sh on ssh connection -if [[ -z "${STY}" && -n "${SSH_TTY}" ]]; then - command -v remote-login.sh >/dev/null && /usr/bin/remote-login.sh +if [[ -z "${STY}" && -n "${SSH_TTY}" && "$(grep -w 'archboot' /etc/hostname)" ]]; then + /usr/bin/remote-login.sh exit 0 fi