From 23c952944075cc3650802e598cedc064a84f485f Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 25 Jan 2024 02:20:32 +0100 Subject: [PATCH] feat: Detect SeaBIOS --- src/power.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/power.sh b/src/power.sh index 74f5d0d..5d67fbc 100644 --- a/src/power.sh +++ b/src/power.sh @@ -118,14 +118,15 @@ _graceful_shutdown() { if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$QEMU_PTY" ]; then if ! grep -Fq "Windows Boot Manager" "$QEMU_PTY"; then - info "Cannot send ACPI signal during Windows setup, aborting..." - finish "$code" && return "$code" - else - if [ -f "$STORAGE/$BASE" ]; then - rm -f "$STORAGE/$BASE" - touch "$STORAGE/windows.boot" + if ! grep -Fq "SeaBIOS" "$QEMU_PTY"; then + info "Cannot send ACPI signal during Windows setup, aborting..." + finish "$code" && return "$code" fi fi + if [ -f "$STORAGE/$BASE" ]; then + rm -f "$STORAGE/$BASE" + touch "$STORAGE/windows.boot" + fi fi # Send ACPI shutdown signal