mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-11-11 08:42:42 +01:00
fix: Display timeout
This commit is contained in:
1 parent
fafd4a4fca
commit
3bcd831531
1 file changed
+5
-1
+5
-1
@@ -4,7 +4,7 @@ set -Eeuo pipefail
|
||||
# Configure QEMU for graceful shutdown
|
||||
|
||||
QEMU_PORT=7100
|
||||
QEMU_TIMEOUT=50
|
||||
QEMU_TIMEOUT=55
|
||||
QEMU_PID="/run/qemu.pid"
|
||||
QEMU_COUNT="/run/qemu.count"
|
||||
|
||||
@@ -67,6 +67,10 @@ _graceful_shutdown() {
|
||||
|
||||
done
|
||||
|
||||
if [ "$(cat $QEMU_COUNT)" -ge "$QEMU_TIMEOUT" ]; then
|
||||
echo && error "Shutdown timeout reached, forcefully quitting.."
|
||||
fi
|
||||
|
||||
echo && echo "❯ Quitting..."
|
||||
echo 'quit' | nc -q 1 -w 1 localhost "$QEMU_PORT" >/dev/null 2>&1 || true
|
||||
|
||||
|
||||
Reference in new issue
Block a user