Loading src/entry.sh +5 −4 Original line number Diff line number Diff line Loading @@ -22,11 +22,12 @@ if [[ "$CONSOLE" == [Yy]* ]]; then exec qemu-system-x86_64 ${ARGS:+ $ARGS} fi [[ "$DEBUG" == [Yy1]* ]] && info "$VERS" && set -x msg=$(qemu-system-x86_64 ${ARGS:+ $ARGS}) [[ "$DEBUG" == [Yy1]* ]] && info "$VERS" && echo "Arguments: $ARGS" && echo { qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || : (( rc != 0 )) && error "$(cat "$QEMU_LOG")" && exit 15 { set +x; } 2>/dev/null && terminal "$msg" terminal tail -fn +0 "$QEMU_LOG" 2>/dev/null & cat "$QEMU_TERM" 2>/dev/null & wait $! || true cat "$QEMU_TERM" 2>/dev/null & wait $! || : sleep 1 && finish 0 src/power.sh +17 −9 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ QEMU_PORT=7100 QEMU_TIMEOUT=50 QEMU_PID="/run/qemu.pid" QEMU_LOG="/run/qemu.log" QEMU_OUT="/run/qemu.out" QEMU_END="/run/qemu.end" if [[ "$KVM" == [Nn]* ]]; then Loading @@ -19,9 +20,6 @@ if [[ "$KVM" == [Nn]* ]]; then QEMU_TIMEOUT=$(( QEMU_TIMEOUT*2 )) fi rm -f "$QEMU_PID" rm -f "$QEMU_LOG" rm -f "$QEMU_END" touch "$QEMU_LOG" _trap() { Loading Loading @@ -62,15 +60,25 @@ finish() { terminal() { local msg=$1 local dev="" if [ -f "$QEMU_OUT" ]; then local msg msg="$(cat "$QEMU_OUT")" if [ -n "$msg" ]; then if [[ "${msg,,}" != "char"* || "$msg" != *"serial0)" ]]; then echo "$msg" fi local dev="${msg#*/dev/p}" dev="${msg#*/dev/p}" dev="/dev/p${dev%% *}" fi fi if [ ! -c "$dev" ]; then dev=$(echo 'info chardev' | nc -q 1 -w 1 localhost "$QEMU_PORT" | tr -d '\000') dev="${dev#*serial0}" Loading src/reset.sh +1 −4 Original line number Diff line number Diff line Loading @@ -36,10 +36,7 @@ STORAGE="/storage" # Cleanup files rm -f /run/dsm.url rm -f /run/qemu.ip rm -f /run/qemu.log rm -f /run/qemu.pid rm -f /run/qemu.end rm -f /run/qemu.* # Cleanup dirs Loading src/disk.sh +2 −2 File changed.Contains only whitespace changes. Show changes Loading
src/entry.sh +5 −4 Original line number Diff line number Diff line Loading @@ -22,11 +22,12 @@ if [[ "$CONSOLE" == [Yy]* ]]; then exec qemu-system-x86_64 ${ARGS:+ $ARGS} fi [[ "$DEBUG" == [Yy1]* ]] && info "$VERS" && set -x msg=$(qemu-system-x86_64 ${ARGS:+ $ARGS}) [[ "$DEBUG" == [Yy1]* ]] && info "$VERS" && echo "Arguments: $ARGS" && echo { qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || : (( rc != 0 )) && error "$(cat "$QEMU_LOG")" && exit 15 { set +x; } 2>/dev/null && terminal "$msg" terminal tail -fn +0 "$QEMU_LOG" 2>/dev/null & cat "$QEMU_TERM" 2>/dev/null & wait $! || true cat "$QEMU_TERM" 2>/dev/null & wait $! || : sleep 1 && finish 0
src/power.sh +17 −9 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ QEMU_PORT=7100 QEMU_TIMEOUT=50 QEMU_PID="/run/qemu.pid" QEMU_LOG="/run/qemu.log" QEMU_OUT="/run/qemu.out" QEMU_END="/run/qemu.end" if [[ "$KVM" == [Nn]* ]]; then Loading @@ -19,9 +20,6 @@ if [[ "$KVM" == [Nn]* ]]; then QEMU_TIMEOUT=$(( QEMU_TIMEOUT*2 )) fi rm -f "$QEMU_PID" rm -f "$QEMU_LOG" rm -f "$QEMU_END" touch "$QEMU_LOG" _trap() { Loading Loading @@ -62,15 +60,25 @@ finish() { terminal() { local msg=$1 local dev="" if [ -f "$QEMU_OUT" ]; then local msg msg="$(cat "$QEMU_OUT")" if [ -n "$msg" ]; then if [[ "${msg,,}" != "char"* || "$msg" != *"serial0)" ]]; then echo "$msg" fi local dev="${msg#*/dev/p}" dev="${msg#*/dev/p}" dev="/dev/p${dev%% *}" fi fi if [ ! -c "$dev" ]; then dev=$(echo 'info chardev' | nc -q 1 -w 1 localhost "$QEMU_PORT" | tr -d '\000') dev="${dev#*serial0}" Loading
src/reset.sh +1 −4 Original line number Diff line number Diff line Loading @@ -36,10 +36,7 @@ STORAGE="/storage" # Cleanup files rm -f /run/dsm.url rm -f /run/qemu.ip rm -f /run/qemu.log rm -f /run/qemu.pid rm -f /run/qemu.end rm -f /run/qemu.* # Cleanup dirs Loading