Unverified Commit b16f0abf authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Refactor QEMU execution logic

parent 9d87fc7d
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -31,7 +31,13 @@ info "Booting image${BOOT_DESC} using QEMU v$version..."

[[ "$SHUTDOWN" != [Yy1]* ]] && exec qemu-system-x86_64 ${ARGS:+ $ARGS}

qemu-system-x86_64 ${ARGS:+ $ARGS} </dev/tty >/dev/tty & wait $!
if [ ! -c /dev/tty ]; then
   qemu-system-x86_64 ${ARGS:+ $ARGS} &
else
   qemu-system-x86_64 ${ARGS:+ $ARGS} </dev/tty >/dev/tty &
else
 
wait $!
sleep 1 & wait $!

[ ! -f "$QEMU_END" ] && finish 0