[SCM] live-boot branch, debian-next, updated. debian/3.0_b2-1-3-gbc1381a

Daniel Baumann daniel at debian.org
Wed Sep 26 11:49:00 UTC 2012


The following commit has been merged in the debian-next branch:
commit bc1381a7ad79e2d511df49a8e1c672893f4ed3fc
Author: Daniel Baumann <daniel at debian.org>
Date:   Wed Sep 26 13:48:59 2012 +0200

    Exposing rofs and persistence mounts under /live in the live systems, not just initramfs only.

diff --git a/scripts/boot/9990-overlay.sh b/scripts/boot/9990-overlay.sh
index 597ff50..9450171 100755
--- a/scripts/boot/9990-overlay.sh
+++ b/scripts/boot/9990-overlay.sh
@@ -405,8 +405,26 @@ setup_unionfs ()
 		done
 	fi
 
+	# make /root/live writable for moving filesystems
 	mkdir -p "${rootmnt}/live"
-	mount -o move /live "${rootmnt}/live" >/dev/null 2>&1 || mount -o bind /live "${rootmnt}/live" || log_warning_msg "Unable to move or bind /live to ${rootmnt}/live"
+	mount -t tmpfs tmpfs "${rootmnt}/live"
+
+	# move all mountpoints to root filesystem
+	for _DIRECTORY in rofs persistence
+	do
+		if [ -d "/live/${_DIRECTORY}" ]
+		then
+			mkdir -p "${rootmnt}/live/${_DIRECTORY}"
+
+			for _MOUNT in $(ls /live/${_DIRECTORY})
+			do
+				mkdir -p "${rootmnt}/live/${_DIRECTORY}/${_MOUNT}"
+				mount -o move "/live/${_DIRECTORY}/${_MOUNT}" "${rootmnt}/live/${_DIRECTORY}/${_MOUNT}" >/dev/null 2>&1 || \
+					mount -o bind "/live/${_DIRECTORY}/${_MOUNT}" "${rootmnt}/live/${_DIRECTORY}/${_MOUNT}" || \
+					log_warning_msg "Unable to move or bind /live/${_DIRECTORY}/${_MOUNT} to ${rootmnt}/live/${_DIRECTORY}/${_MOUNT}"
+			done
+		fi
+	done
 
 	# shows cow fs on /overlay (FIXME: do we still need/want this? probably yes)
 	mkdir -p "${rootmnt}/live/overlay"

-- 
live-boot



More information about the debian-live-changes mailing list