diff --git a/src/power.sh b/src/power.sh index 25f6576..af99b25 100644 --- a/src/power.sh +++ b/src/power.sh @@ -98,7 +98,6 @@ terminal() { _graceful_shutdown() { - local cnt=0 local code=$? local pid url response @@ -144,6 +143,8 @@ _graceful_shutdown() { fi + local cnt=0 + while [ "$cnt" -lt "$QEMU_TIMEOUT" ]; do ! isAlive "$pid" && break