feat: Detect SeaBIOS

This commit is contained in:
Kroese 2024-01-25 02:20:32 +01:00 committed by GitHub
parent f95f7fe1a7
commit 23c9529440
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,15 +118,16 @@ _graceful_shutdown() {
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$QEMU_PTY" ]; then if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$QEMU_PTY" ]; then
if ! grep -Fq "Windows Boot Manager" "$QEMU_PTY"; then if ! grep -Fq "Windows Boot Manager" "$QEMU_PTY"; then
if ! grep -Fq "SeaBIOS" "$QEMU_PTY"; then
info "Cannot send ACPI signal during Windows setup, aborting..." info "Cannot send ACPI signal during Windows setup, aborting..."
finish "$code" && return "$code" finish "$code" && return "$code"
else fi
fi
if [ -f "$STORAGE/$BASE" ]; then if [ -f "$STORAGE/$BASE" ]; then
rm -f "$STORAGE/$BASE" rm -f "$STORAGE/$BASE"
touch "$STORAGE/windows.boot" touch "$STORAGE/windows.boot"
fi fi
fi fi
fi
# Send ACPI shutdown signal # Send ACPI shutdown signal
echo 'system_powerdown' | nc -q 1 -w 1 localhost "${QEMU_PORT}" > /dev/null echo 'system_powerdown' | nc -q 1 -w 1 localhost "${QEMU_PORT}" > /dev/null