mirror of
https://gitlab.com/hacklab01/pivilion.git
synced 2026-08-06 16:08:22 +00:00
Move MOTD into TTY login banner
This commit is contained in:
parent
ed0b168ab6
commit
bbbf80c25f
11 changed files with 137 additions and 29 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
14
etc/systemd/system/pivilion-login-banner.service
Normal file
14
etc/systemd/system/pivilion-login-banner.service
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue