First-boot setup on the serial console too

The setup asked only on the screen (tty1); it now also asks on the serial console (ttyS0), so a
VM can be set up from a serial terminal or a script. Whichever console is answered first stops
the setup on the other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V27snprgiQMRMB6RRDNjCX
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-14 12:21:50 +00:00
1 parent fd1ef420cd
commit 5f2a5c2b23
6 files changed
+28 -21

No files matched your search

+4 -1
View File
@@ -1,5 +1,6 @@
#!/bin/bash
# First boot: asks for the root password and the runner's registration on the console (tty1).
# First boot: asks for the root password and the runner's registration, on the screen (tty1) and the
# serial console (ttyS0) at once (gitea-runner-setup@.service).
# /etc is read-only, so the answers go to /var: the password to /var/lib/shadow (etc-shadow.mount
# puts it over /etc/shadow), the rest to the runner's runner.env.
set -euo pipefail
@@ -28,3 +29,5 @@ GITEA_RUNNER_REGISTRATION_TOKEN=$token
GITEA_RUNNER_CAPACITY=$capacity
ENV
echo "Done. The runner registers itself within a few seconds."
# Stop the setup on the other console, which then shows its login.
systemctl --no-block stop "gitea-runner-setup@*.service"