explicit check on archboot environment

This commit is contained in:
Tobias Powalowski 2023-09-14 11:28:58 +02:00
parent da0bf70dee
commit 89567348e7

View file

@ -22,11 +22,11 @@ if command -v nvim >/dev/null; then
alias edit='nvim' alias edit='nvim'
fi fi
# show MOTD on ttyd login # 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 [[ "${SHLVL}" == "2" ]] && cat /etc/motd
fi fi
# run remote-login.sh on ssh connection # run remote-login.sh on ssh connection
if [[ -z "${STY}" && -n "${SSH_TTY}" ]]; then if [[ -z "${STY}" && -n "${SSH_TTY}" && "$(grep -w 'archboot' /etc/hostname)" ]]; then
command -v remote-login.sh >/dev/null && /usr/bin/remote-login.sh /usr/bin/remote-login.sh
exit 0 exit 0
fi fi