diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-09 14:41:46 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-04-09 14:42:35 +0200 |
commit | efcc68a2485ed35389eed873462ac97743dd1896 (patch) | |
tree | 29862205429c1f2899832a0244f91057dd485153 /bin/g-i-installation.sh | |
parent | dec223060f54a0586a93c237cda8958c40483090 (diff) | |
download | jenkins.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-x | bin/g-i-installation.sh | 5 |
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 |