From e3bb3556afb3a612a724095614fade0863a1a667 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 24 May 2018 13:52:28 -0400 Subject: Clean up --- systemd/system/qemu | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'systemd') 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 -- cgit v1.2.3-2-g168b