summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-02 09:48:24 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-02 09:48:24 +0100
commitcd583bd9f570a088d78a010b16beb7bcaccf00a4 (patch)
tree907bee855bd610e86ce4561191301c6108729120
parentd2ee73fedf7bddaa3a9bac6c6a1cc2be94478419 (diff)
Try to get vmbuild to wait for virtualbox to terminate.
-rwxr-xr-xvmbuild4
1 files changed, 4 insertions, 0 deletions
diff --git a/vmbuild b/vmbuild
index 3a2209d..1c08f2c 100755
--- a/vmbuild
+++ b/vmbuild
@@ -20,6 +20,7 @@ else
fi
nohup vboxheadless --startvm fedora-22-$bits &
+vbox=$!
sleep 10
ssh -p $port carl@localhost "rm -rf fedora-*"
ssh -p $port carl@localhost cdist -p dcpomatic -c $checkout -t host package
@@ -27,3 +28,6 @@ if [ "$output" != "" ]; then
scp -P $port carl@localhost:fedora-22-$bits/* $output/
fi
ssh -p $port carl@localhost "sudo /sbin/poweroff"
+while [[ ( -d /proc/$vbox ) && ( -z `grep zombie /proc/$vbox/status` ) ]]; do
+ sleep 1
+done