[SCM] live-boot branch, debian, updated. debian/3.0_a35-1-11-g6b6fda1

Daniel Baumann daniel at debian.org
Wed Jul 18 21:59:56 UTC 2012


The following commit has been merged in the debian branch:
commit 5e0f95f84ee957b1ab27a53f1bd2d4f728f63fca
Author: Daniel Baumann <daniel at debian.org>
Date:   Mon Jul 2 18:19:59 2012 +0200

    Adding support for defining one or more explicit swap partitions to be used.

diff --git a/scripts/boot/0110-cmdline b/scripts/boot/0110-cmdline
index d80c54f..aa12286 100755
--- a/scripts/boot/0110-cmdline
+++ b/scripts/boot/0110-cmdline
@@ -11,6 +11,11 @@ Cmdline ()
 				LIVE_READ_ONLY="true"
 				;;
 
+			live-boot.swapon=*|swapon=*)
+				LIVE_SWAPON="true"
+				LIVE_SWAPON_DEVICES="${_PARAMETER#*swapon=}"
+				;;
+
 			live-boot.swapon|swapon)
 				LIVE_SWAPON="true"
 				;;
diff --git a/scripts/boot/3020-swapon b/scripts/boot/3020-swapon
index 158d81b..281fd04 100755
--- a/scripts/boot/3020-swapon
+++ b/scripts/boot/3020-swapon
@@ -4,7 +4,12 @@
 
 Swapon ()
 {
-	_DEVICES="/dev/sd* /dev/vd*"
+	if [ "${LIVE_SWAPON}" != "true" ]
+	then
+		return 0
+	fi
+
+	LIVE_SWAPON_DEVICES="${LIVE_SWAPON_DEVICES:-/dev/sd* /dev/vd*}"
 
 	if [ -e /run ]
 	then
@@ -15,7 +20,7 @@ Swapon ()
 		_FSTAB="/root/etc/fstab"
 	fi
 
-	for _DEVICE in ${_DEVICES}
+	for _DEVICE in $(echo ${LIVE_SWAPON_DEVICES} | sed -e 's|,| |g')
 	do
 		if [ ! -b "${_DEVICE}" ]
 		then
@@ -41,7 +46,7 @@ Swapon ()
 	fi
 
 	# Add new swap entries
-	for _DEVICE in _SWAP_DEVICES
+	for _DEVICE in ${_SWAP_DEVICES}
 	do
 		echo "${_DEVICE} swap swap defaults 0 0" >> "${_FSTAB}"
 	done

-- 
live-boot



More information about the debian-live-changes mailing list