From efcc68a2485ed35389eed873462ac97743dd1896 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Thu, 9 Apr 2015 14:41:46 +0200 Subject: g-i-installation: kill qemu IFF there are actual processes running (avoids noise in the build log) --- bin/g-i-installation.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/g-i-installation.sh') diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index bc6213b5..94bb8819 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -1340,7 +1340,10 @@ case $NAME in # kill qemu and image # set -x - sudo kill -9 $(ps fax | grep [q]emu-system | grep "vnc=$DISPLAY " 2>/dev/null | awk '{print $1}') || true + TOKILL=$(ps fax | grep [q]emu-system | grep "vnc=$DISPLAY " 2>/dev/null | awk '{print $1}') + if [ ! -z "$TOKILL" ] ; then + sudo kill -9 "$TOKILL" || true + fi set +x if [ ! -z "$IMAGE" ] ; then sudo umount -l $IMAGE_MNT || true -- cgit v1.2.3-54-g00ecf