mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-11-11 08:42:42 +01:00
fix: Show QEMU errors on unexpected exit (#1280)
This commit is contained in:
1 parent
e81c509208
commit
797411ae7f
1 file changed
+13
-1
+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