diff options
Diffstat (limited to 'systemd/system')
-rwxr-xr-x | systemd/system/qemu | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/systemd/system/qemu b/systemd/system/qemu index ca35498..475ec10 100755 --- a/systemd/system/qemu +++ b/systemd/system/qemu @@ -1,4 +1,6 @@ #!/usr/bin/env bash +shopt -s lastpipe +set -euE -o pipefail source "/etc/conf.d/qemu.d/$1" args+=( @@ -6,12 +8,10 @@ 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 + -serial file:"/dev/stdout" -daemonize ) { - 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 + qemu-system-"${system}" "${args[@]}" + systemd-notify --ready +} | exec cat |