- Updated `bf-wireguard-restart.yml` to include dynamic host targeting based on `operation_wave`. - Added pre-tasks to assert that the operation wave is approved and confirmed, ensuring proper execution context. - Modified the service restart task to use a more structured command format. - Adjusted `operations.py` and `ui_gui.py` to reflect changes in operation scope from "simple" to "wave" for relevant operations. - Improved UI handling in `ui_gui.py` and `ui_surfaces.py` for better output management and user interaction. - Updated log rotation configuration to target specific log files. - Enhanced systemd service configurations for WireGuard to improve restart behavior. - Refined firstboot scripts to ensure proper handling of dealer ID and state management. - Improved error handling and rollback mechanisms in identity and installation scripts.
38 lines
1.9 KiB
Desktop File
38 lines
1.9 KiB
Desktop File
[Unit]
|
|
Description=Blueforce Field OS first-boot offline provisioning (terminal wizard)
|
|
Documentation=file:/usr/share/doc/blueforce/firstboot/README.md
|
|
After=multi-user.target
|
|
# Prerequisites that must exist before the wizard may run: the seed-provided administrator
|
|
# public key is mandatory for the offline installer. The dealer number is NOT a condition,
|
|
# because a technician at the field console enters it through the wizard.
|
|
ConditionPathExists=/etc/blueforce/admin-authorized-key.pub
|
|
# Run once per machine: once the completion marker exists the unit is skipped (not failed).
|
|
ConditionPathExists=!/var/lib/blueforce/firstboot-complete
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
Environment=BF_ADMIN_PUBLIC_KEY_FILE=/etc/blueforce/admin-authorized-key.pub
|
|
ExecStart=/usr/local/sbin/bf-firstboot
|
|
# The wizard reads and writes the field console. If no TTY can be set up (headless unit,
|
|
# no console attached) systemd fails this unit and boot continues; the script itself also
|
|
# falls back to the --dealer-id/--dealer-id-file path when no terminal is available.
|
|
StandardInput=tty-force
|
|
StandardOutput=tty
|
|
StandardError=tty
|
|
TTYPath=/dev/tty1
|
|
TTYReset=yes
|
|
TTYVHangup=yes
|
|
# Upper bound so a console that nobody answers can never hold the boot job open. The
|
|
# wizard's own input read is bounded too (BF_FIRSTBOOT_INPUT_TIMEOUT). The installer is
|
|
# resumable (--resume reuses install-state), but a SIGTERM mid-apt on a full-pool run
|
|
# still risks a wedged dpkg; the bound is generous so a complete run fits inside it.
|
|
TimeoutStartSec=120min
|
|
RemainAfterExit=yes
|
|
# Hardening that the offline installer tolerates. ProtectSystem=strict, ProtectHome=yes
|
|
# and similar sandboxing are deliberately absent: the installer legitimately writes /etc,
|
|
# /usr and the identity-derived /home/bf-<dealer-id>, and those options would break apt/dpkg and the user module.
|
|
NoNewPrivileges=yes
|
|
PrivateTmp=yes
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|