mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-08-28 20:06:05 +00:00
fix: Show QEMU errors on unexpected exit (#1280)
This commit is contained in:
+13
-1
@@ -101,6 +101,12 @@ cleanupHelpers() {
|
||||
finish() {
|
||||
|
||||
local reason=$1
|
||||
local failed=0
|
||||
|
||||
if [ ! -f "$QEMU_END" ] && (( reason != 0 )); then
|
||||
failed=1
|
||||
fi
|
||||
|
||||
touch "$QEMU_END"
|
||||
|
||||
forceKillQemu "$reason"
|
||||
@@ -110,7 +116,13 @@ finish() {
|
||||
warn "Timed out while waiting for $(app) to exit!"
|
||||
fi
|
||||
|
||||
(( reason != 1 )) && echo && echo "❯ Shutdown completed!"
|
||||
echo
|
||||
|
||||
if (( failed == 0 )); then
|
||||
echo "❯ Shutdown completed!"
|
||||
else
|
||||
error "QEMU exited unexpectedly!"
|
||||
fi
|
||||
|
||||
exit "$reason"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user