Fix captive portal detection and restore MOTD

This commit is contained in:
v3d 2026-06-29 17:29:00 +02:00
parent 3b7a16564b
commit 34b4c4b036
9 changed files with 153 additions and 59 deletions

View file

@ -0,0 +1,12 @@
# Show the Pivilion status banner for the configured owner on interactive Bash
# login shells. Other users and non-interactive sessions remain unchanged.
[ -n "${BASH_VERSION:-}" ] || return 0
case $- in *i*) ;; *) return 0 ;; esac
[ -r /usr/local/lib/pivilion/common.sh ] || return 0
[ "${PIVILION_MOTD_SHOWN:-0}" != 1 ] || return 0
. /usr/local/lib/pivilion/common.sh
pivilion_load_config >/dev/null 2>&1 || return 0
[ "$(id -un)" = "$PIVILION_USER" ] || return 0
pivilion_print_motd
export PIVILION_MOTD_SHOWN=1