From a3aaeb9cd41a09ac6e23c20b1d661ede8474a76d Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 26 May 2024 12:23:50 +0200 Subject: [PATCH] Update power.sh --- src/power.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/power.sh b/src/power.sh index 421da53..d921ad5 100644 --- a/src/power.sh +++ b/src/power.sh @@ -29,14 +29,18 @@ boot() { if [ -s "$QEMU_PTY" ]; then if [ "$(stat -c%s "$QEMU_PTY")" -gt 7 ]; then - if ! grep -Fq "BOOTMGR is missing" "$QEMU_PTY"; then - info "Windows started succesfully, visit http://localhost:8006/ to view the screen..." - return 0 + if [[ "${BOOT_MODE,,}" == "windows_legacy" ]]; then + grep -Fq "No bootable device." "$QEMU_PTY" && finish 33 && return 0 + grep -Fq "BOOTMGR is missing" "$QEMU_PTY" && finish 33 && return 0 fi + info "Windows started succesfully, visit http://localhost:8006/ to view the screen..." + return 0 fi fi error "Timeout while waiting for QEMU to boot the machine!" + + finish 33 return 0 }