Update power.sh

This commit is contained in:
Kroese 2024-02-05 21:56:28 +01:00 committed by GitHub
parent 9c7ea2f6b9
commit 471a110b3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,8 +41,8 @@ finish() {
done done
fi fi
if [ ! -f "$STORAGE/windows.old" ]; then if [ ! -f "$STORAGE/windows.old" ] && [ ! -f "$STORAGE/windows.boot" ]; then
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$QEMU_PTY" ]; then if [ -f "$QEMU_PTY" ]; then
if grep -Fq "$BOOT_LINE" "$QEMU_PTY"; then if grep -Fq "$BOOT_LINE" "$QEMU_PTY"; then
rm -f "$STORAGE/$BASE" rm -f "$STORAGE/$BASE"
touch "$STORAGE/windows.boot" touch "$STORAGE/windows.boot"
@ -126,8 +126,8 @@ _graceful_shutdown() {
finish "$code" && return "$code" finish "$code" && return "$code"
fi fi
if [ ! -f "$STORAGE/windows.old" ]; then if [ ! -f "$STORAGE/windows.old" ] && [ ! -f "$STORAGE/windows.boot" ]; then
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$QEMU_PTY" ]; then if [ -f "$QEMU_PTY" ]; then
if ! grep -Fq "$BOOT_LINE" "$QEMU_PTY"; then if ! grep -Fq "$BOOT_LINE" "$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"