From 0cc40637997984029dbcc47234b47c5da8ea0cd2 Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Thu, 6 Dec 2012 19:26:48 +0100 Subject: Use do_on_exit() in build scripts for cleanup --- testing/scripts/build-umlhostfs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'testing/scripts/build-umlhostfs') 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 -- cgit v1.2.3