summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-05-24 13:52:28 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-08-21 00:51:06 -0400
commite3bb3556afb3a612a724095614fade0863a1a667 (patch)
tree354f3414ce3c913c6534b68898f9666820491a60 /systemd
parent5016c1da15b3fadefb98f1fe18697b0cfe04187d (diff)
Clean up
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/system/qemu12
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