mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 15:42:20 +00:00
Start QEMU in the background with a QMP socket and console logs, take screenshots, press keys and wait for serial output, so the graphical boot menu can be driven without a terminal or a window. boot.sh gets opt-in knobs for this and behaves as before otherwise.
16 lines
369 B
Bash
Executable File
16 lines
369 B
Bash
Executable File
#!/bin/sh
|
|
# Prints the state of QEMU: stopped, or the pid and the VM status such as running.
|
|
# Exits 1 when QEMU isn't running.
|
|
set -e
|
|
|
|
cd "$(dirname "${0}")/../../.." || exit 1
|
|
|
|
. "hack/dev/run/lib.sh"
|
|
|
|
if ! is_running; then
|
|
echo "stopped"
|
|
exit 1
|
|
fi
|
|
|
|
echo "pid $(cat "${PID_FILE}") $(./hack/dev/run/qmp.sh '{"execute":"query-status"}' 2>/dev/null || echo "no qmp")"
|