]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(crypt): install all crypto modules in the generic initrd
authorHarald Hoyer <harald@redhat.com>
Tue, 4 May 2021 08:40:23 +0000 (10:40 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Tue, 4 May 2021 09:25:55 +0000 (11:25 +0200)
Just install all `=crypto` drivers in the generic initramfs, because who
are we to decide which combinations are allowed in current and future
`cryptsetup`. We only could install blacklist filter in the future, if
there are modules, which are definetely not used and are huge in size.

modules.d/90crypt/module-setup.sh

index bef9151f85d39940896edd3c51e2bdcc294ae4a7..4eb27ac5d723d46d0b0a7d7a75747378d1043c38 100755 (executable)
@@ -30,7 +30,7 @@ installkernel() {
     # in case some of the crypto modules moved from compiled in
     # to module based, try to install those modules
     # best guess
-    [[ $hostonly ]] || [[ $mount_needs ]] && {
+    if [[ $hostonly ]] || [[ $mount_needs ]]; then
         # dmsetup returns s.th. like
         # cryptvol: 0 2064384 crypt aes-xts-plain64 :64:logon:cryptsetup:....
         dmsetup table | while read -r name _ _ is_crypt cipher _; do
@@ -47,7 +47,9 @@ installkernel() {
                 hostonly='' instmods "${mods[@]/#/crypto-}" "crypto-$cipher"
             fi
         done
-    }
+    else
+        instmods "=crypto"
+    fi
     return 0
 }