Print debug info

This commit is contained in:
Kroese 2023-05-01 22:56:07 +02:00 committed by GitHub
parent ffe08bc043
commit b75b81ee3c

View File

@ -72,14 +72,16 @@ EXTRA_OPTS="$EXTRA_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,ad
ARGS="${DEF_OPTS} ${CPU_OPTS} ${RAM_OPTS} ${MAC_OPTS} ${MON_OPTS} ${SERIAL_OPTS} ${NET_OPTS} ${DISK_OPTS} ${EXTRA_OPTS}"
ARGS=$(echo "$ARGS" | sed 's/\t/ /g' | tr -s ' ')
[ "$DEBUG" = "Y" ] && set -x
set -m
(
[ "$DEBUG" = "Y" ] && set -x
qemu-system-x86_64 ${ARGS:+ $ARGS} & echo $! > "${_QEMU_PID}"
[ "$DEBUG" = "Y" ] && { set +x; } 2>/dev/null
)
set +m
{ set +x; } 2>/dev/null
if (( KERNEL > 4 )); then
pidwait -F "${_QEMU_PID}" & wait $!
else