summaryrefslogtreecommitdiffstats
path: root/bin/g-i-installation.sh
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-09 14:41:46 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-09 14:42:35 +0200
commitefcc68a2485ed35389eed873462ac97743dd1896 (patch)
tree29862205429c1f2899832a0244f91057dd485153 /bin/g-i-installation.sh
parentdec223060f54a0586a93c237cda8958c40483090 (diff)
downloadjenkins.debian.net-efcc68a2485ed35389eed873462ac97743dd1896.tar.xz
g-i-installation: kill qemu IFF there are actual processes running (avoids noise in the build log)
Diffstat (limited to 'bin/g-i-installation.sh')
-rwxr-xr-xbin/g-i-installation.sh5
1 files changed, 4 insertions, 1 deletions
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