From 11b334d3277e659a40a1f988c5a56b66ed064d55 Mon Sep 17 00:00:00 2001 From: veilor-org Date: Wed, 6 May 2026 10:32:11 +0100 Subject: [PATCH] feat(installer): 10s reboot countdown with per-tick redraw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v0.5 used `sleep 5` after a static "System will reboot in 5 seconds." box, which left the operator guessing how much time was left to grab the USB stick. The new loop runs 10 → 1, clearing + redrawing the gum-style success box each tick with the remaining-seconds figure, giving the operator a visible window to act. 10 seconds (vs 5) because real hardware operators were missing the window — laptops with the USB on the far side of the dock take 4-5 seconds to physically reach. 10 is comfortable, not annoying. --- overlay/usr/local/bin/veilor-installer | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/overlay/usr/local/bin/veilor-installer b/overlay/usr/local/bin/veilor-installer index 09e3348..9b4b6ab 100644 --- a/overlay/usr/local/bin/veilor-installer +++ b/overlay/usr/local/bin/veilor-installer @@ -1043,12 +1043,23 @@ run_install() { --show-output \ -- bash -c 'anaconda --cmdline --kickstart=/run/install/veilor-generated.ks 2>&1 | tee /tmp/anaconda-cmdline.log' || rc=$? if [[ $rc -eq 0 ]]; then - gum style --foreground 2 --border rounded --margin "1 2" --padding "1 3" \ - "✓ Install complete" \ - "" \ - "System will reboot in 5 seconds." \ - "Remove the install media." - sleep 5 + # v0.6: 10-second redraw countdown so the operator knows + # exactly when the reboot will fire (and has time to grab + # the USB stick before it boots back into the live ISO). + # Each tick clears + redraws the styled box with the new + # remaining-seconds figure — no fancy in-place repaint, just + # a clean re-render via clear+gum-style which the linux + # fbcon handles without flicker. + local secs + for secs in 10 9 8 7 6 5 4 3 2 1; do + clear + gum style --foreground 2 --border rounded --margin "1 2" --padding "1 3" \ + "✓ Install complete" \ + "" \ + "Rebooting in ${secs}s..." \ + "Remove the install media." + sleep 1 + done systemctl reboot else prompt_error "Anaconda exited non-zero (status $rc).