]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
feat(crypt): check if fido2 module is needed in hostonly mode
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Wed, 24 Nov 2021 07:32:17 +0000 (08:32 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Wed, 24 Nov 2021 12:15:42 +0000 (12:15 +0000)
In hostonly mode, include the fido2 module if any encrypted volumes
are configured to be decrypted using a FIDO2 security token.

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

index 639d9cdddc77a6fe378eb34f9d4aac5b91cccb88..fce898f8fa70e04f38aafe08b4e443200871a559 100755 (executable)
@@ -24,6 +24,9 @@ depends() {
         if grep -q "tpm2-device=" "$dracutsysrootdir"/etc/crypttab; then
             deps+=" tpm2-tss"
         fi
+        if grep -q -e "fido2-device=" -e "fido2-cid=" "$dracutsysrootdir"/etc/crypttab; then
+            deps+=" fido2"
+        fi
     fi
     echo "$deps"
     return 0