1 2

[PATCH builds.sr.ht] images: use -display none

Details
Message ID
<_o34P2uiZ5mqHUEX7xKLpu3GmmiyW-d1-nxbWQFADUqy64VZOKUiJrBWeOAmJ5nXzQ1ZRTX6ahlnEiKj0ryBvi4P-mDUtqQGhJcgY1m6alU=@emersion.fr>
DKIM signature
pass
Download raw message
Patch: +8 -7
From: emersion <contact@emersion.fr>

This gives qemu a chance to print an error message in case anything
goes wrong.

Also fail on unset variables and fix indentation.
---
 images/control           | 6 +++---
 images/freebsd/functions | 9 +++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/images/control b/images/control
index 6af1766..130161d 100755
--- a/images/control
+++ b/images/control
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh -eu
 self=$(readlink -f $0)
 self=$(dirname "$self")
 
@@ -61,11 +61,11 @@ _qemu_boot() {
 		-pidfile /tmp/qemu-$port.id \
 		-m ${MEMORY:-2048} \
 		-net nic,model=virtio -net user,hostfwd=tcp::$port-:22 \
-		-nographic \
+		-display none \
 		-device virtio-rng-pci \
 		-device virtio-balloon \
 		-drive file="$wd/$arch/root.img.qcow2",media=disk,snapshot=on,${driveopts:-if=virtio} \
-		"$@" >/dev/null 2>&1 </dev/null &
+		"$@" &
 }
 
 _boot() {
diff --git a/images/freebsd/functions b/images/freebsd/functions
index f99b619..7991e4a 100644
--- a/images/freebsd/functions
+++ b/images/freebsd/functions
@@ -1,4 +1,5 @@
 #!/bin/sh
+poweroff_cmd="sudo poweroff"
 default_arch=amd64
 
 boot() {
@@ -19,10 +20,10 @@ install() {
 }
 
 sanity_check() {
-	echo "Booting..."
-	cmd_boot amd64 8022 qemu &
-	trap 'cmd_cleanup 8022' EXIT
-	_wait_boot 8022
+    echo "Booting..."
+    cmd_boot amd64 8022 qemu &
+    trap 'cmd_cleanup 8022' EXIT
+    _wait_boot 8022
     sleep 20
     echo "Testing sudo..."
     guest_ssh -p 8022 build@localhost sudo ls -a
-- 
-- 
2.20.1
Details
Message ID
<20190212141053.GB1608@homura.localdomain>
In-Reply-To
<_o34P2uiZ5mqHUEX7xKLpu3GmmiyW-d1-nxbWQFADUqy64VZOKUiJrBWeOAmJ5nXzQ1ZRTX6ahlnEiKj0ryBvi4P-mDUtqQGhJcgY1m6alU=@emersion.fr> (view parent)
DKIM signature
pass
Download raw message
Also added this to the docker qemu command. Thanks!

To git.sr.ht:~sircmpwn/builds.sr.ht
   bf980b6..0330da4  master -> master