feat(firstboot): force root + operator password on first boot (console gate) #139

Merged
clawdie merged 6 commits from force-root-password-on-first-boot into main 2026-06-25 07:21:34 +02:00
Showing only changes of commit f428bc7fcb - Show all commits

View file

@ -105,6 +105,19 @@ _rootpw_prompt_and_set() {
done
}
# Visible "Continuing in 3s 2s 1s" countdown before boot resumes, so the
# operator can read the result before clawdie_live_gpu repaints the screen.
_rootpw_continue_countdown() {
_n="${1:-3}"
printf ' Continuing in '
while [ "${_n}" -gt 0 ]; do
printf '%ss ' "${_n}"
sleep 1
_n=$((_n - 1))
done
printf '... proceeding.\n'
}
clawdie_firstboot_rootpw_start() {
_rootpw_secured && return 0
@ -124,12 +137,12 @@ clawdie_firstboot_rootpw_start() {
_rootpw_prompt_and_set root "ROOT (admin)"
_rootpw_prompt_and_set clawdie "OPERATOR (clawdie)"
_rootpw_mark_secured
printf ' Node secured. Continuing boot...\n'
sleep 2
printf ' Node secured.\n'
_rootpw_continue_countdown 3
else
printf '\n\n [skipped] passwords NOT set — this node remains OPEN.\n'
printf ' You will be prompted again on the next boot.\n'
sleep 3
_rootpw_continue_countdown 3
fi
return 0
}