From 38e732ea790cf1a531eb1a1eaf2f81e85ffc1f2f Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 28 Jul 2026 15:25:35 +0200 Subject: [PATCH] feat: Abort QEMU on detected boot failure (#2018) --- src/power.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/power.sh b/src/power.sh index f7a86505..2fbcab47 100644 --- a/src/power.sh +++ b/src/power.sh @@ -64,27 +64,25 @@ waitForBoot() { fi case "$status" in - 0) + 0) echo + if [[ "${DISPLAY,,}" == "web" ]] && ! disabled "${WEB:-Y}"; then info "$(app) started successfully, $screen" else info "$(app) started successfully." fi - return 0 ;; - 2) - if [[ "${DISPLAY,,}" == "web" ]] && ! disabled "${WEB:-Y}"; then - warn "$(app) could not boot, $screen" - else - warn "$(app) could not boot." - fi + echo && return 0 ;; + + 2) error "$(app) could not boot, aborting..." + terminateQemu + return 0 ;; - return 0 ;; esac (( SECONDS >= deadline )) && break - sleep 0.1 + sleep 0.25 done ! isAlive "$pid" && return 0