]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(systemd-cryptsetup): add potentially needed modules to generic initrd
authorDaniel Winzen <daniel@danwin1210.de>
Sat, 25 May 2024 15:38:06 +0000 (17:38 +0200)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sat, 25 May 2024 18:47:17 +0000 (14:47 -0400)
modules.d/90systemd-cryptsetup/module-setup.sh

index a2a37defbed88f1e2999bcb8ced324d977e50399..da37bdef0f959cb370b49286c90f71fd7b9a151a 100755 (executable)
@@ -30,6 +30,13 @@ depends() {
         if grep -q "tpm2-device=" "$dracutsysrootdir"/etc/crypttab; then
             deps+=" tpm2-tss"
         fi
+    elif [[ ! $hostonly ]]; then
+        for module in fido2 pkcs11 tpm2-tss; do
+            module_check $module > /dev/null 2>&1
+            if [[ $? == 255 ]]; then
+                deps+=" $module"
+            fi
+        done
     fi
     echo "$deps"
     return 0