Files
senior-kiosk/preseed-bootstrap.sh
T
jgitta d3b05f981f fix: stop getty@tty1 before first-boot setup service to prevent SIGHUP kill
Conflicts=getty@tty1 ensures systemd releases TTY1 before kiosk-setup
runs interactively. Also add partman/choose_partition select finish to
preseed so disk write confirmation is fully automated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 23:33:20 +00:00

42 lines
1.2 KiB
Bash

#!/bin/bash
set -e
# Downloaded and run by the preseed late_command after Debian base install.
# Fetches install-kiosk.sh and installs it as a first-boot setup service.
# The service runs interactively on the first reboot, prompts for name/username,
# then installs the kiosk and reboots into kiosk mode.
REPO_BASE="https://gitea.jgitta.com/jgitta/senior-kiosk/raw/branch/master"
echo "==> SeniorNet: downloading setup script..."
curl -fsSL "$REPO_BASE/install-kiosk.sh" -o /usr/local/bin/kiosk-setup
chmod +x /usr/local/bin/kiosk-setup
echo "==> SeniorNet: installing first-boot service..."
cat > /etc/systemd/system/kiosk-firstboot.service << 'EOF'
[Unit]
Description=SeniorNet Kiosk First-Boot Setup
After=network-online.target
Wants=network-online.target
Conflicts=getty@tty1.service
After=getty@tty1.service
[Service]
Type=oneshot
ExecStart=/usr/local/bin/kiosk-setup
StandardInput=tty
TTYPath=/dev/tty1
TTYReset=yes
IgnoreSIGPIPE=no
RemainAfterExit=no
[Install]
WantedBy=multi-user.target
EOF
systemctl enable kiosk-firstboot
# Boot to text mode for the first-boot wizard, then kiosk setup switches to graphical
systemctl set-default multi-user.target
echo "==> SeniorNet: ready. First-boot setup will run on next reboot."