Update power.sh

This commit is contained in:
Kroese 2024-01-25 08:29:40 +01:00 committed by GitHub
parent defc1f7084
commit 54fc94a765
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -121,7 +121,7 @@ _graceful_shutdown() {
if [ ! -f "$STORAGE/windows.bios" ]; then if [ ! -f "$STORAGE/windows.bios" ]; then
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
remove_iso="y" [ -f "$STORAGE/$BASE" ] && remove_iso="y"
else else
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"
@ -152,7 +152,7 @@ _graceful_shutdown() {
if [ "$cnt" -ge "$QEMU_TIMEOUT" ]; then if [ "$cnt" -ge "$QEMU_TIMEOUT" ]; then
error "Shutdown timeout reached, aborting..." error "Shutdown timeout reached, aborting..."
else else
if [ -f "$STORAGE/$BASE" ] && [ -n "$remove_iso" ]; then if [ -n "$remove_iso" ]; then
rm -f "$STORAGE/$BASE" rm -f "$STORAGE/$BASE"
touch "$STORAGE/windows.boot" touch "$STORAGE/windows.boot"
fi fi