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

Update entry.sh

parent 164a6aa5
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -29,4 +29,14 @@ trap - ERR
version=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1 | awk '{ print $NF }')
info "Booting image${BOOT_DESC} using QEMU v$version..."

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

{ qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
(( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15

terminal
tail -fn +0 "$QEMU_LOG" --pid=$$ 2>/dev/null &
socat STDIO,rawer,echo=0 FILE:"$QEMU_TERM",nonblock 2>/dev/null || :

sleep 1 & wait $!
[ ! -f "$QEMU_END" ] && finish 0