mirror of
https://github.com/dockur/windows.git
synced 2025-10-29 04:05:50 +00:00
Update power.sh
This commit is contained in:
parent
ec6b3e38e1
commit
1854921582
1 changed files with 5 additions and 9 deletions
14
src/power.sh
14
src/power.sh
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue