Update power.sh

This commit is contained in:
Kroese 2024-01-24 02:32:43 +01:00 committed by GitHub
parent 8a940b6e33
commit 3bf41d9172
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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