mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
explicit check on archboot environment
This commit is contained in:
parent
da0bf70dee
commit
89567348e7
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue