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

View file

@ -1,13 +0,0 @@
[Unit]
Description=Display the Pivilion boot greeting and system status
After=local-fs.target
Before=getty@tty1.service
[Service]
Type=oneshot
ExecStart=/usr/local/lib/pivilion/boot-greeter.sh
StandardOutput=journal+console
StandardError=journal+console
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,14 @@
[Unit]
Description=Generate the Pivilion TTY login banner
After=local-fs.target
Before=getty@tty1.service
[Service]
Type=oneshot
ExecStart=/usr/local/lib/pivilion/issue-banner.sh
TimeoutStartSec=5
StandardOutput=null
StandardError=journal
[Install]
WantedBy=multi-user.target