Thomas Stallinger 683cf70af5 fix: /updates auf dem Live-System deployen + Kunden-ISO-Build (Phase 4)
Casper merged /updates nie automatisch auf das gebootete Live-System -
eine seit Projektbeginn unverifizierte Annahme, die erst beim echten
QEMU-Boot (UEFI, kompletter GRUB->Live-Desktop-Pfad) einer personalisierten
Kunden-ISO aufgefallen ist: /opt/tuxflotte fehlte trotz korrekt auf dem
Medium liegendem /cdrom/updates vollständig.

Fix per casper-bottom-Hook, eingebettet via Initrd-Cpio-Konkatenation
(scripts/lib/initrd.sh, derselbe in Phase 1 verifizierte Mechanismus wie
beim Kexec-Preseed). Wichtig dabei: ein komplett neuer Hook-Skriptname wird
nie ausgeführt, weil mkinitramfs eine statische ORDER-Datei mit der
Aufrufliste ins Initrd backt - stattdessen wird der Inhalt des bereits
gelisteten, garantiert letzten Skripts (99casperboot) überschrieben.

start-kiosk.sh erkennt jetzt TUXFLOTTE_AUTO_MODE und startet den Installer
automatisch statt der Kiosk-Startseite. build_customer_iso.sh baut daraus
personalisierte Kunden-ISOs (WLAN-Zugangsdaten + Enrollment-Session-Code).

Nebenbei zwei vorbestehende Bugs behoben: xorriso -osirrox übernimmt
Original-ISO-Dateirechte (oft 444/555, kein Write-Bit), was cp/rm -rf in
build.sh/build_customer_iso.sh bisher unbemerkt kaputt gemacht hat.

Real per QEMU verifiziert (echter GRUB-Boot einer gebauten Kunden-ISO).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-06 22:18:04 +02:00

43 lines
2.5 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# German keyboard layout for the graphical session (vconsole.keymap=de on the
# kernel cmdline only covers the text console, not X11/Wayland input). Cinnamon
# ships its own parallel org.cinnamon.desktop.input-sources schema, separate
# from GNOME's org.gnome.desktop.input-sources — writing org.gnome alone had
# no effect (confirmed on real hardware), so both are set here.
dconf write /org/cinnamon/desktop/input-sources/sources "[('xkb', 'de')]"
dconf write /org/gnome/desktop/input-sources/sources "[('xkb', 'de')]"
# Suppresses Epiphany's "set as default browser?" first-run prompt (schema
# default is true, see /usr/share/glib-2.0/schemas/org.gnome.epiphany.gschema.xml).
dconf write /org/gnome/epiphany/ask-for-default false
# Kiosk cleanup: no desktop icons (Nemo). The panel itself is kept (removing
# the last panel via panels-enabled triggers Cinnamon's own "you don't have
# any panels, open panel settings?" confirmation dialog — hardcoded in
# js/ui/panel.js, no way to suppress it, so panels-enabled is deliberately
# left untouched). Instead, only the two useful applets are kept: a window
# list (to restore Epiphany if a user minimizes it) and power (shutdown/
# reboot) — everything else (menu, systray, clock, workspace switcher etc.)
# is removed. Deliberately the classic window-list@cinnamon.org, not
# grouped-window-list@cinnamon.org: the grouped variant ships default
# "pinned apps" launchers (firefox.desktop, org.gnome.Terminal.desktop,
# nemo.desktop — confirmed via its settings-schema.json) that showed up in
# the panel even with unrelated applets removed. Plain window-list has no
# pinned-apps concept at all, only ever shows actually open windows.
dconf write /org/nemo/desktop/show-desktop-icons false
dconf write /org/cinnamon/enabled-applets "['panel1:left:0:window-list@cinnamon.org:1', 'panel1:right:0:power@cinnamon.org:2']"
mkdir -p /home/liveuser/.local/share/tuxflotte-kiosk
# Auto-Modus (personalisierte Kunden-ISO, siehe scripts/build_customer_iso.sh)
# startet den Installer sofort unbeaufsichtigt statt der Kiosk-Startseite -
# config/installer.conf wird nur bei personalisierten Abbildern mitgeliefert,
# das Standard-/Testabbild bleibt unverändert interaktiv.
if grep -qE '^\s*(export\s+)?TUXFLOTTE_AUTO_MODE=true\s*$' /opt/tuxflotte/config/installer.conf 2>/dev/null; then
exec sudo /opt/tuxflotte/scripts/installer.sh
fi
exec epiphany --profile=/home/liveuser/.local/share/tuxflotte-kiosk file:///opt/tuxflotte/kiosk/index.html