specifying the values for 
root_persistence="$(get_param_value 'rootpersistence=')"
root_persistence, homepersistence, rootsnapshotlabel and homesnapshotlabel 
give a lot of possibilities for configuring multiple Operating Systems and 
partitions in only one disk unit.
and allowing this values to be blank will speed up a lot the startup process
diff -Naur initrd-110-7-orig.txt/scripts/live initrd.txt/scripts/live
--- initrd-110-7-orig.txt/scripts/live	2007-11-19 10:58:26.000000000 +0100
+++ initrd.txt/scripts/live	2007-11-19 17:18:48.000000000 +0100
@@ -397,9 +401,96 @@
 				;;
 
 			xvideomode=*)
-				XVIDEOMODE="${ARGUMENT#xvideomode=}"
+				XVIDEOMODE="$(get_param_value 'xvideomode=')"
 				export XVIDEOMODE
 				;;
+
+			rootpersistence=*)
+				root_persistence="$(get_param_value 'rootpersistence=')"
+				;;
+
+			norootpersistence)
+				root_persistence=
+				;;
+
+			homepersistence=*)
+				home_persistence="$(get_param_value 'homepersistence=')"
+				;;
+
+			nohomepersistence)
+				home_persistence=
+				;;
+
+			rootsnapshotlabel=*)
+				root_snapshot_label="$(get_param_value 'rootsnapshotlabel=')"
+				;;
+
+			norootsnapshotlabel)
+				root_snapshot_label=
+				;;
+
+			homesnapshotlabel=*)
+				home_snapshot_label="$(get_param_value 'homesnapshotlabel=')"
+				;;
+
+			nohomesnapshotlabel)
+				home_snapshot_label=
+				;;
+
+			nosnapshots)
+				home_snapshot_label=
+				root_snapshot_label=
+				;;
+
 		esac
 	done
 
@@ -973,7 +1074,7 @@
 	mkdir -p /cow
 
 	# Looking for "${root_persistence}" device or file
-	if [ -n "${PERSISTENT}" ]
+	if [ -n "${PERSISTENT}" -a  -n "${root_persistence}" ]
 	then
 		cowprobe=$(find_cow_device "${root_persistence}")
 
@@ -1055,8 +1155,21 @@
 	mkdir -p "${rootmnt}/live"
 	mount -t tmpfs tmpfs ${rootmnt}/live
 
 	# Adding other custom mounts
-	if [ -n "${PERSISTENT}" ]
+	if [ -n "${PERSISTENT}" -a -n "${home_persistence}" ]
 	then
 		# directly mount /home
 		# FIXME: add a custom mounts configurable system
@@ -1071,8 +1185,8 @@
 		fi
 
 		# Look for other snapshots to copy in
-		try_snap "${root_snapshot_label}" "${rootmnt}" "ROOT"
-		try_snap "${home_snapshot_label}" "${rootmnt}/home" "HOME"
+		[ -n "${root_snapshot_label}" ] && try_snap "${root_snapshot_label}" "${rootmnt}" "ROOT"
+		[ -n "${home_snapshot_label}" ] && try_snap "${home_snapshot_label}" "${rootmnt}/home" "HOME"
 	fi
 
 	if [ -n "${SHOWMOUNTS}" ]
_______________________________________________
debian-live-devel mailing list
debian-live-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to