[buildd-tools-devel] [PATCH 1/3] [union] Cleanup union handling in scripts

Jan-Marek Glogowski glogow at fbihome.de
Mon Aug 3 12:12:36 UTC 2009


Just a little reorganisation.
---
 etc/setup.d/10mount |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/etc/setup.d/10mount b/etc/setup.d/10mount
index 9fbf6ca..b43a900 100755
--- a/etc/setup.d/10mount
+++ b/etc/setup.d/10mount
@@ -134,30 +134,22 @@ if [ "$CHROOT_TYPE" = "directory" ] || [ "$CHROOT_TYPE" = "file" ] || [ "$CHROOT
 	    exit 1
 	fi
 
-        # If recovering, we want to remount all filesystems to ensure
-        # a sane state.
-	if [ "$CREATE_UNION" = "yes" ]; then
-	    if [ $1 = "setup-recover" ]; then
-		do_umount_all "$CHROOT_UNION_UNDERLAY_DIRECTORY"
-	    fi
-	fi
-
 	# If recovering, we want to remount all filesystems to ensure
 	# a sane state.
 	if [ $1 = "setup-recover" ]; then
+	    if [ "$CREATE_UNION" = "yes" ]; then
+		do_umount_all "$CHROOT_UNION_UNDERLAY_DIRECTORY"
+	    fi
 	    do_umount_all "$CHROOT_MOUNT_LOCATION"
 	fi
 
 	if [ "$CREATE_UNION" = "yes" ]; then
 	    do_mount "$CHROOT_MOUNT_OPTIONS" "$CHROOT_MOUNT_DEVICE" "$CHROOT_UNION_UNDERLAY_DIRECTORY"
+	    do_mount_fs_union "$CHROOT_MOUNT_LOCATION"
 	else
 	    do_mount "$CHROOT_MOUNT_OPTIONS" "$CHROOT_MOUNT_DEVICE" "$CHROOT_MOUNT_LOCATION"
 	fi
 
-	if [ "$CREATE_UNION" = "yes" ]; then
-	    do_mount_fs_union "$CHROOT_MOUNT_LOCATION"
-	fi
-
 	if [ -n "$FSTAB" ]; then
 	    if [ -f "$FSTAB" ]; then
 		"$LIBEXEC_DIR/schroot-mount" $VERBOSE \
-- 
1.6.4




More information about the Buildd-tools-devel mailing list