Move MOTD into TTY login banner

This commit is contained in:
v3d 2026-06-29 23:08:56 +02:00
parent ed0b168ab6
commit bbbf80c25f
11 changed files with 137 additions and 29 deletions

View file

@ -1,7 +1,8 @@
# Show the Pivilion status banner for the configured owner on interactive Bash
# login shells. Other users and non-interactive sessions remain unchanged.
# TTY consoles receive the banner from agetty before login. Keep the
# post-authentication banner only for interactive SSH sessions.
[ -n "${BASH_VERSION:-}" ] || return 0
case $- in *i*) ;; *) return 0 ;; esac
[ -n "${SSH_CONNECTION:-}" ] || return 0
[ -r /usr/local/lib/pivilion/common.sh ] || return 0
[ "${PIVILION_MOTD_SHOWN:-0}" != 1 ] || return 0