Update power.sh

This commit is contained in:
Kroese 2024-05-26 12:10:24 +02:00 committed by GitHub
parent ec6b3e38e1
commit 1854921582
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,18 +49,14 @@ ready() {
local last local last
local bios="Booting from Hard" local bios="Booting from Hard"
last=$(grep "^Booting.*" "$QEMU_PTY" | tail -1) last=$(grep "^Booting.*" "$QEMU_PTY" | tail -1)
if [[ "${last,,}" == "${bios,,}"* ]]; then [[ "${last,,}" != "${bios,,}"* ]] && return 1
if ! grep -Fq "BOOTMGR is missing" "$QEMU_PTY"; then grep -Fq "No bootable device." "$QEMU_PTY" && return 1
grep -Fq "BOOTMGR is missing" "$QEMU_PTY" && return 1
return 0 return 0
fi fi
fi
return 1
fi
local line="\"Windows Boot Manager\"" local line="\"Windows Boot Manager\""
if grep -Fq "$line" "$QEMU_PTY"; then grep -Fq "$line" "$QEMU_PTY" && return 0
return 0
fi
return 1 return 1
} }