fix: an update reboots the computer only once nobody is using it
The update check has been daily at 03:00, Persistent, since 0.1.5 — the lab's installed stable machine logged it at 03:01 and 03:04 on successive days — and it stays so. What changes is the reboot after an update. It happened the moment the update was installed: harmless at 03:00, and a room restarting itself mid-morning when a computer switched off at 03:00 caught up after being switched on. Now the updater installs, with every check it had (the device's own channel, a newer version, the manifest's SHA-256, name and version), and starts classroom-reboot-when-idle, which reboots once no input device has produced an event for 30 minutes and no sound card has played for as long. At 03:00 that is about 03:30; switched off first, the next start is on the new version. The service has no [Install] and nothing enables it. The release gate checks after every install and upgrade that the timer is enabled, daily at 03:00, Persistent, with no boot or repeat trigger and no drop-in, and that the updater no longer reboots by itself. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
23194a085c
commit
3c40e849ea
@@ -193,6 +193,10 @@ install -Dm755 \
|
||||
"$ROOT/scripts/ekklesia-classroom-update" \
|
||||
"$STAGE/usr/local/bin/ekklesia-classroom-update"
|
||||
|
||||
install -Dm755 \
|
||||
"$ROOT/scripts/classroom-reboot-when-idle" \
|
||||
"$STAGE/usr/local/bin/classroom-reboot-when-idle"
|
||||
|
||||
# System configuration.
|
||||
install -Dm644 \
|
||||
"$ROOT/config/sddm/ekklesia-classroom.conf" \
|
||||
@@ -206,6 +210,11 @@ install -Dm644 \
|
||||
"$ROOT/systemd/updater/ekklesia-classroom-update.timer" \
|
||||
"$STAGE/etc/systemd/system/ekklesia-classroom-update.timer"
|
||||
|
||||
# After an update: the reboot, once nobody is using the computer.
|
||||
install -Dm644 \
|
||||
"$ROOT/systemd/updater/ekklesia-classroom-reboot-when-idle.service" \
|
||||
"$STAGE/etc/systemd/system/ekklesia-classroom-reboot-when-idle.service"
|
||||
|
||||
install -Dm644 \
|
||||
"$ROOT/systemd/provision/ekklesia-classroom-provision.service" \
|
||||
"$STAGE/etc/systemd/system/ekklesia-classroom-provision.service"
|
||||
|
||||
@@ -145,6 +145,20 @@ systemctl is-enabled NetworkManager.service >/dev/null
|
||||
systemctl is-enabled cups.service >/dev/null
|
||||
! systemctl is-enabled NetworkManager-wait-online.service >/dev/null 2>&1
|
||||
|
||||
# The update check: daily at 03:00, caught up after a night switched off,
|
||||
# and still so after this install or upgrade. The reboot after an update
|
||||
# waits until nobody is using the computer, in a unit nothing enables.
|
||||
systemctl is-enabled ekklesia-classroom-update.timer >/dev/null
|
||||
timer=/etc/systemd/system/ekklesia-classroom-update.timer
|
||||
grep -qx 'OnCalendar=\*-\*-\* 03:00:00' "$timer"
|
||||
grep -qx 'Persistent=true' "$timer"
|
||||
! grep -qE '^(OnBootSec|OnStartupSec|OnUnitActiveSec|OnUnitInactiveSec|OnActiveSec)=' "$timer"
|
||||
! ls /etc/systemd/system/ekklesia-classroom-update.timer.d/*.conf >/dev/null 2>&1
|
||||
test -x /usr/local/bin/classroom-reboot-when-idle
|
||||
[[ "$(systemctl is-enabled ekklesia-classroom-reboot-when-idle.service 2>/dev/null || true)" == "static" ]]
|
||||
! grep -q '"systemctl", "reboot"' /usr/local/bin/ekklesia-classroom-update
|
||||
grep -q 'ekklesia-classroom-reboot-when-idle.service' /usr/local/bin/ekklesia-classroom-update
|
||||
|
||||
# The audio policy reaches a session, and is ordered after the server it
|
||||
# actually talks to. Ordering it only after pipewire and wireplumber is
|
||||
# what let it race PipeWire's PulseAudio server at boot, fail its one
|
||||
|
||||
Reference in New Issue
Block a user