diff options
author | Reto Buerki <reet@codelabs.ch> | 2012-12-06 19:26:48 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-01-17 15:22:11 +0100 |
commit | 0cc40637997984029dbcc47234b47c5da8ea0cd2 (patch) | |
tree | 7f6c34994634538d9cd0aa1c65fa6e17c09d297c /testing/scripts/build-baseimage | |
parent | 9a045eef8e003b46fb93369a7888d65b01730a1d (diff) | |
download | strongswan-0cc40637997984029dbcc47234b47c5da8ea0cd2.tar.bz2 strongswan-0cc40637997984029dbcc47234b47c5da8ea0cd2.tar.xz |
Use do_on_exit() in build scripts for cleanup
Diffstat (limited to 'testing/scripts/build-baseimage')
-rwxr-xr-x | testing/scripts/build-baseimage | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/scripts/build-baseimage b/testing/scripts/build-baseimage index 4b81c5cdb..b8f709216 100755 --- a/testing/scripts/build-baseimage +++ b/testing/scripts/build-baseimage @@ -32,6 +32,9 @@ log_action "Mounting cache to $CACHEDIR" mkdir -p $APTCACHE execute "mount -o bind $CACHEDIR $APTCACHE" +do_on_exit umount -l $APTCACHE +do_on_exit umount -l $LOOPDIR + log_action "Running debootstrap ($ROOTFSSUITE, $ROOTFSARCH)" execute "debootstrap --arch=$ROOTFSARCH --include=$PACKAGES $ROOTFSSUITE $LOOPDIR $ROOTFSMIRROR" @@ -45,6 +48,3 @@ do log_action "Disabling service $service" execute_chroot "update-rc.d -f $service remove" done - -execute "umount -l $APTCACHE" 0 -execute "umount -l $LOOPDIR" 0 |