aboutsummaryrefslogtreecommitdiffstats
path: root/testing/scripts/build-umlrootfs
diff options
context:
space:
mode:
authorReto Buerki <reet@codelabs.ch>2012-12-09 10:50:28 +0100
committerTobias Brunner <tobias@strongswan.org>2013-01-17 16:54:54 +0100
commit74c0839ad6e0da6f299b65ed39fe2f21fa19caf9 (patch)
treea39ccf0d0be7d6198f13d455af71cdbc63caad94 /testing/scripts/build-umlrootfs
parent97265abaf0265d0cc59fb1be02e3239fca3daae3 (diff)
downloadstrongswan-74c0839ad6e0da6f299b65ed39fe2f21fa19caf9.tar.bz2
strongswan-74c0839ad6e0da6f299b65ed39fe2f21fa19caf9.tar.xz
Run on_exit commands in FILO order
Diffstat (limited to 'testing/scripts/build-umlrootfs')
-rwxr-xr-xtesting/scripts/build-umlrootfs7
1 files changed, 3 insertions, 4 deletions
diff --git a/testing/scripts/build-umlrootfs b/testing/scripts/build-umlrootfs
index 6131c1d1c..f6bcaa78e 100755
--- a/testing/scripts/build-umlrootfs
+++ b/testing/scripts/build-umlrootfs
@@ -37,22 +37,21 @@ execute "cp $ROOTFS $BASE"
log_action "Connecting base image to NBD device $NBDEV"
execute "qemu-nbd -c $NBDEV $BASE"
+do_on_exit qemu-nbd -d $NBDEV
partprobe $NBDEV
log_action "Mounting $NBDPARTITION to $LOOPDIR"
execute "mount $NBDPARTITION $LOOPDIR"
+do_on_exit umount $LOOPDIR
log_action "Mounting proc filesystem to $LOOPDIR/proc"
execute "mount -t proc none $LOOPDIR/proc"
+do_on_exit umount $LOOPDIR/proc
mkdir -p $LOOPDIR/root/compile
log_action "Mounting $ROOTFSCOMPILEDIR as /root/compile"
execute "mount -o bind $ROOTFSCOMPILEDIR $LOOPDIR/root/compile"
-
do_on_exit umount $LOOPDIR/root/compile
-do_on_exit umount $LOOPDIR/proc
-do_on_exit umount $LOOPDIR
-do_on_exit qemu-nbd -d $NBDEV
echo "Installing software from source"
RECPDIR=$TESTDIR/testing/scripts/recipes