[PATCH 2/3] Have cryptroot-ask load dm_crypt if needed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If dm_crypt is not loaded automatically whenever a LUKS encrypted partition
is detected (due to distro-specific tweaks to the udev rules or whatever),
load it manually.

---
 modules.d/90crypt/cryptroot-ask.sh |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh
index 0eadeeb..c10cdc6 100755
--- a/modules.d/90crypt/cryptroot-ask.sh
+++ b/modules.d/90crypt/cryptroot-ask.sh
@@ -9,6 +9,9 @@
 # we already asked for this device
 [ -f /tmp/cryptroot-asked-$2 ] && exit 0
 
+# load dm_crypt if it is not already loaded
+[ -d /sys/module/dm_crypt ] || modprobe dm_crypt
+
 . /lib/dracut-lib.sh
 LUKS=$(getargs rd_LUKS_UUID=)
 ask=1
-- 
1.6.4.4

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux