summaryrefslogtreecommitdiff
path: root/scripts/live
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2011-11-10 19:05:00 +0100
committerDaniel Baumann <daniel@debian.org>2011-11-24 09:42:08 +0100
commita7e59be8118df46c9f43ba05561990ce3e62a81d (patch)
treec0e2be930e4cb992794b98ef48d7d9c2efd2e7c7 /scripts/live
parentd8df882369aad68caf3ac39692e2196e932ef15b (diff)
downloadlive-boot-a7e59be8118df46c9f43ba05561990ce3e62a81d.tar.gz
live-boot-a7e59be8118df46c9f43ba05561990ce3e62a81d.zip
Disabling persistent-encryption=luks if dependencies are unavailable.
Current dependencies are dm-crypt, cryptsetup and askpass.
Diffstat (limited to 'scripts/live')
-rwxr-xr-xscripts/live17
1 files changed, 17 insertions, 0 deletions
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"