[SCM] live-boot branch, debian-next, updated. debian/3.0_a22-1-25-gf885467

Daniel Baumann daniel at debian.org
Thu Nov 24 17:37:31 UTC 2011


The following commit has been merged in the debian-next branch:
commit a7e59be8118df46c9f43ba05561990ce3e62a81d
Author: Tails developers <amnesia at boum.org>
Date:   Thu Nov 10 19:05:00 2011 +0100

    Disabling persistent-encryption=luks if dependencies are unavailable.
    
    Current dependencies are dm-crypt, cryptsetup and askpass.

diff --git a/scripts/live b/scripts/live
index e0663b6..688c0a7 100755
--- a/scripts/live
+++ b/scripts/live
@@ -391,6 +391,23 @@ Arguments ()
 		export UNIONTYPE
 	fi
 
+	if [ "${PERSISTENT_ENCRYPTION}" = "luks" ]
+	then
+		if ! modprobe dm-crypt
+		then
+			log_warning_msg "Unable to load module dm-crypt"
+			PERSISTENT_ENCRYPTION="none"
+			export PERSISTENT_ENCRYPTION
+		fi
+
+		if [ ! -x /lib/cryptsetup/askpass ] || [ ! -x /sbin/cryptsetup ]
+		then
+			log_warning_msg "cryptsetup in unavailable"
+			PERSISTENT_ENCRYPTION="none"
+			export PERSISTENT_ENCRYPTION
+		fi
+	fi
+
 	if [ -n "${PERSISTENT}" ] && [ -z "${PERSISTENT_METHOD}" ]
 	then
 		PERSISTENT_METHOD="snapshot,overlay"
diff --git a/scripts/live-helpers b/scripts/live-helpers
index bbed909..33d2ee7 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -344,20 +344,8 @@ find_persistent_media ()
 		luks_device=""
 
 		# Checking for a luks device
-		if [ "${PERSISTENT_ENCRYPTION}" = "luks" ] && [ -e /sbin/cryptsetup ]
+		if [ "${PERSISTENT_ENCRYPTION}" = "luks" ]
 		then
-			if ! modprobe dm-crypt
-			then
-				log_warning_msg "Unable to load module dm-crypt"
-				continue
-			fi
-
-			if [ ! -x /lib/cryptsetup/askpass ] || [ ! -x /sbin/cryptsetup ]
-			then
-				log_warning_msg "cryptsetup in unavailable"
-				continue
-			fi
-
 			if ! /sbin/cryptsetup isLuks ${dev}
 			then
 				# skip device since we strictly want luks devices

-- 
live-boot



More information about the debian-live-changes mailing list