From 74c0839ad6e0da6f299b65ed39fe2f21fa19caf9 Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Sun, 9 Dec 2012 10:50:28 +0100 Subject: Run on_exit commands in FILO order --- testing/scripts/build-umlrootfs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'testing/scripts/build-umlrootfs') 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 -- cgit v1.2.3