[SCM] live-boot branch, debian, updated. debian/3.0_a20-1-11-g413bda3

Tails developers amnesia at boum.org
Thu Sep 8 19:09:56 UTC 2011


The following commit has been merged in the debian branch:
commit 41112e3945280cb19dab1fed2b224a763e97fe55
Author: Tails developers <amnesia at boum.org>
Date:   Mon Nov 1 18:30:19 2010 +0100

    Adding support for persistent-media={removable,removable-usb}.
    
    This is e.g. needed when one's threat model does not allow her to trust the
    local hard disks.

diff --git a/manpages/en/live-boot.7 b/manpages/en/live-boot.7
index 0a88d51..c4d4d6a 100644
--- a/manpages/en/live-boot.7
+++ b/manpages/en/live-boot.7
@@ -112,6 +112,8 @@ live\-boot will look for persistent and snapshot partitions or files labeled "li
 If "nofiles" is specified, only filesystems with matching labels will be searched; no filesystems will be traversed looking for archives or image files. This results in shorter boot times.
 .br
 If "cryptsetup" is specified, filesystems stored on Luks\-encrypted devices will be considered as well as others when searching for a persistence filesystem; the user will be prompted for any needed decryption passphrase.
+.IP "\fBpersistent\-media\fR={\fIremovable\fR|\fIremovable\-usb\fR}" 4
+If you specify the keyword 'removable', live\-boot will try to find persistent and snapshot partitions on removable media only. Note that if you want to further restrict the media to usb mass storage only, you can use the 'removable\-usb' keyword.
 .IP "\fBpersistent\-path\fR=\fIPATH\fR" 4
 live\-boot will look for persistency files in the root directory of a partition, with this parameter, the path can be configured so that you can have multiple directories on the same partition to store persistency files.
 .IP "\fBpersistent\-subtext\fR=\fISUFFIX\fR" 4
diff --git a/scripts/live b/scripts/live
index 952d479..c2ad14e 100755
--- a/scripts/live
+++ b/scripts/live
@@ -253,6 +253,11 @@ Arguments ()
 				export PERSISTENT
 				;;
 
+			persistent-media=*)
+				PERSISTENT_MEDIA="${ARGUMENT#*=}"
+				export PERSISTENT_MEDIA
+				;;
+
 			persistent-path=*)
 				PERSISTENT_PATH="${ARGUMENT#persistent-path=}"
 				export PERSISTENT_PATH
@@ -1324,6 +1329,7 @@ setup_unionfs ()
 	# Looking for "${root_persistence}" device or file
 	if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
 	then
+
 		if [ -z "${QUICKUSBMODULES}" ]
 		then
 			# Load USB modules
@@ -1351,6 +1357,18 @@ setup_unionfs ()
 			done
 		fi
 
+		case "${PERSISTENT_MEDIA}" in
+			removable)
+				whitelistdev="$(removable_dev)"
+				;;
+			removable-usb)
+				whitelistdev="$(removable_usb_dev)"
+				;;
+			*)
+				whitelistdev=""
+				;;
+		esac
+
 		# search for label and files (this could be hugely optimized)
 		cowprobe=$(find_cow_device "${root_persistence}" "${blacklistdev}" "${whitelistdev}")
 		if [ -b "${cowprobe}" ]

-- 
live-boot



More information about the debian-live-changes mailing list