mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 16:56:33 +00:00
fix(deploy): purge Pi welcome wizard + mask display managers
systemctl disable lets apt upgrades re-enable a DM. Mask everything that could put a desktop on tty1. Purge piwiz + userconf-pi (the "Welcome to Raspberry Pi" first-run wizard) and wipe /etc/motd + /etc/update-motd.d so even on console nothing identifies as Pi.
This commit is contained in:
parent
50fd9046bc
commit
93cf261f07
1 changed files with 17 additions and 2 deletions
|
|
@ -172,13 +172,28 @@ if [ "${INSTALL_KIOSK}" = "1" ]; then
|
|||
fi
|
||||
done
|
||||
|
||||
echo "==> Disabling display managers + getty@tty1"
|
||||
for dm in lightdm gdm gdm3 sddm; do
|
||||
echo "==> Disabling + masking display managers, removing Pi first-run wizard"
|
||||
# Mask (not just disable) so nothing — apt upgrades, dependencies — can
|
||||
# re-enable a display manager later.
|
||||
for dm in lightdm gdm gdm3 sddm display-manager; do
|
||||
systemctl disable --now "${dm}.service" 2>/dev/null || true
|
||||
systemctl mask "${dm}.service" 2>/dev/null || true
|
||||
done
|
||||
systemctl set-default multi-user.target
|
||||
systemctl disable --now getty@tty1.service 2>/dev/null || true
|
||||
|
||||
# piwiz = "Welcome to Raspberry Pi" first-run wizard. userconf-pi runs at
|
||||
# first boot if no user is configured. Purge both so they can't fire.
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -y piwiz userconf-pi 2>/dev/null || true
|
||||
rm -f /etc/xdg/autostart/piwiz.desktop
|
||||
systemctl disable --now userconf.service userconf-pi.service 2>/dev/null || true
|
||||
systemctl mask userconf.service userconf-pi.service 2>/dev/null || true
|
||||
|
||||
# Suppress the Debian/Pi console motd and /etc/issue text on tty.
|
||||
: > /etc/motd
|
||||
printf 'BetterFrame Kiosk\n\n' > /etc/issue
|
||||
rm -f /etc/update-motd.d/10-uname /etc/update-motd.d/* 2>/dev/null || true
|
||||
|
||||
echo "==> Installing PAM + systemd unit"
|
||||
install -m 644 "${REPO_ROOT}/deploy/pam.d/cage" /etc/pam.d/cage
|
||||
install -m 644 "${REPO_ROOT}/deploy/systemd/betterframe-kiosk.service" \
|
||||
|
|
|
|||
Loading…
Reference in a new issue