mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40: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'
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue