mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-12-14 06:10:32 +08:00
fix: Shutdown message
* fix: Shutdown message
This commit is contained in:
@@ -35,7 +35,7 @@ finish() {
|
|||||||
if [ -f "$QEMU_PID" ]; then
|
if [ -f "$QEMU_PID" ]; then
|
||||||
|
|
||||||
pid="$(cat "$QEMU_PID")"
|
pid="$(cat "$QEMU_PID")"
|
||||||
echo && error "Forcefully quitting QEMU process, reason: $reason..."
|
echo && error "Forcefully terminating QEMU process, reason: $reason..."
|
||||||
{ kill -15 "$pid" || true; } 2>/dev/null
|
{ kill -15 "$pid" || true; } 2>/dev/null
|
||||||
|
|
||||||
while isAlive "$pid"; do
|
while isAlive "$pid"; do
|
||||||
@@ -51,7 +51,7 @@ finish() {
|
|||||||
closeNetwork
|
closeNetwork
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
echo && info "Shutdown completed!"
|
echo && echo "❯ Shutdown completed!"
|
||||||
|
|
||||||
exit "$reason"
|
exit "$reason"
|
||||||
}
|
}
|
||||||
@@ -98,7 +98,7 @@ _graceful_shutdown() {
|
|||||||
|
|
||||||
response="${response#*message\"\: \"}"
|
response="${response#*message\"\: \"}"
|
||||||
[ -z "$response" ] && response="second signal"
|
[ -z "$response" ] && response="second signal"
|
||||||
echo && error "Forcefully quitting because of: ${response%%\"*}"
|
echo && error "Forcefully terminating because of: ${response%%\"*}"
|
||||||
{ kill -15 "$pid" || true; } 2>/dev/null
|
{ kill -15 "$pid" || true; } 2>/dev/null
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user