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 bios="Booting from Hard"
last=$(grep "^Booting.*" "$QEMU_PTY" | tail -1)
if [[ "${last,,}" == "${bios,,}"* ]]; then
if ! grep -Fq "BOOTMGR is missing" "$QEMU_PTY"; then
return 0
fi
fi
return 1
[[ "${last,,}" != "${bios,,}"* ]] && return 1
grep -Fq "No bootable device." "$QEMU_PTY" && return 1
grep -Fq "BOOTMGR is missing" "$QEMU_PTY" && return 1
return 0
fi
local line="\"Windows Boot Manager\""
if grep -Fq "$line" "$QEMU_PTY"; then
return 0
fi
grep -Fq "$line" "$QEMU_PTY" && return 0
return 1
}