diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-05-23 13:47:01 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-08-21 00:41:24 -0400 |
commit | 5016c1da15b3fadefb98f1fe18697b0cfe04187d (patch) | |
tree | d37c996ff959db81843876a8f5528e5fd6344a78 /systemd/system/qemu | |
parent | 74f4141aa3fdf0033ab367157cd5e4a4313e3b76 (diff) |
Add Type=notify for initialization errors, log ttyS0
Diffstat (limited to 'systemd/system/qemu')
-rwxr-xr-x | systemd/system/qemu | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/systemd/system/qemu b/systemd/system/qemu index 603a437..ca35498 100755 --- a/systemd/system/qemu +++ b/systemd/system/qemu @@ -6,6 +6,12 @@ args+=( -pidfile "/run/qemu-$1/pid" -vnc unix:"/run/qemu-$1/vnc.sock" -monitor unix:"/run/qemu-$1/monitor.sock",server,nowait + -serial unix:"/run/qemu-$1/ttyS0.sock",server -daemonize ) -exec qemu-system-"${system}" "${args[@]}" +{ + until [[ -S /run/qemu-$1/ttyS0.sock ]]; do :; done + exec socat UNIX-CONNECT:"/run/qemu-$1/ttyS0.sock" STDOUT > >(exec cat) +} & +qemu-system-"${system}" "${args[@]}" +systemd-notify --ready |