diff --git a/firstboot.sh b/firstboot.sh index 1b7bb4e..9eaca18 100644 --- a/firstboot.sh +++ b/firstboot.sh @@ -16,9 +16,19 @@ STATUS_PATH="/run/tuxflotte/agent/status" TIMEOUT_SECONDS="${TUXFLOTTE_FIRSTBOOT_TIMEOUT:-1800}" VT=12 +SWITCHED_VT=false + finish() { mkdir -p "$(dirname "${DONE_MARKER}")" date --iso-8601=seconds > "${DONE_MARKER}" + # Zurueck auf Konsole 1 (VM-Test 03.10.2026): ohne grafische Oberflaeche + # (z.B. Debian-Basis-Image) blieb sonst die letzte Fortschrittsanzeige + # auf Konsole 12 stehen. Mit Display-Manager uebernimmt der ohnehin. + if [[ "${SWITCHED_VT}" == true ]]; then + printf '\033[2J\033[H' + setterm --cursor on 2>/dev/null || true + chvt 1 2>/dev/null || true + fi exit 0 } @@ -28,7 +38,7 @@ finish() { if command -v plymouth >/dev/null 2>&1 && plymouth --ping 2>/dev/null; then plymouth quit fi -chvt "${VT}" 2>/dev/null || true +chvt "${VT}" 2>/dev/null && SWITCHED_VT=true setterm --cursor off 2>/dev/null || true ROLES_PATH="/run/tuxflotte/agent/roles"