Making sure dm-crypt is loaded when dealing with LUKS devices.
authorTails developers <amnesia@boum.org>
Tue, 8 Nov 2011 16:33:46 +0000 (17:33 +0100)
committerDaniel Baumann <daniel@debian.org>
Thu, 24 Nov 2011 08:42:08 +0000 (09:42 +0100)
scripts/live-helpers

index 912d800..484ec93 100644 (file)
@@ -330,6 +330,12 @@ find_cow_device ()
                        # Checking for a luks device
                        if [ "${PERSISTENT_ENCRYPTION}" = "luks" ] && [ -e /sbin/cryptsetup ]
                        then
+                               if ! modprobe dm-crypt
+                               then
+                                       log_warning_msg "Unable to load module dm-crypt"
+                                       continue
+                               fi
+
                                if ! /sbin/cryptsetup isLuks ${devname}
                                then
                                        # we only look for encrypted subdevices