feat(crypt): check if fido2 module is needed in hostonly mode

In hostonly mode, include the fido2 module if any encrypted volumes
are configured to be decrypted using a FIDO2 security token.
master
Antonio Alvarez Feijoo 2021-11-24 08:32:17 +01:00 committed by Jóhann B. Guðmundsson
parent dc3b976f33
commit d5fd030cc2
1 changed files with 3 additions and 0 deletions

View File

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