aboutsummaryrefslogtreecommitdiffstats
path: root/testing/scripts/build-umlhostfs
diff options
context:
space:
mode:
authorReto Buerki <reet@codelabs.ch>2012-12-06 19:26:48 +0100
committerTobias Brunner <tobias@strongswan.org>2013-01-17 15:22:11 +0100
commit0cc40637997984029dbcc47234b47c5da8ea0cd2 (patch)
tree7f6c34994634538d9cd0aa1c65fa6e17c09d297c /testing/scripts/build-umlhostfs
parent9a045eef8e003b46fb93369a7888d65b01730a1d (diff)
downloadstrongswan-0cc40637997984029dbcc47234b47c5da8ea0cd2.tar.bz2
strongswan-0cc40637997984029dbcc47234b47c5da8ea0cd2.tar.xz
Use do_on_exit() in build scripts for cleanup
Diffstat (limited to 'testing/scripts/build-umlhostfs')
-rwxr-xr-xtesting/scripts/build-umlhostfs5
1 files changed, 4 insertions, 1 deletions
diff --git a/testing/scripts/build-umlhostfs b/testing/scripts/build-umlhostfs
index e5355988c..b4efc0ecb 100755
--- a/testing/scripts/build-umlhostfs
+++ b/testing/scripts/build-umlhostfs
@@ -36,6 +36,9 @@ else
HOSTS=$*
fi
+# just to be sure
+do_on_exit umount $LOOPDIR
+
for host in $HOSTS
do
log_action "Creating guest image for $host"
@@ -56,6 +59,6 @@ do
execute_chroot "chown -R openldap:openldap /var/lib/ldap" 0
fi
sync
- umount $LOOPDIR
log_status 0
+ umount $LOOPDIR
done