aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>2021-11-24 08:32:17 +0100
committerJóhann B. Guðmundsson <johannbg@gmail.com>2021-11-24 12:15:42 +0000
commitd5fd030cc285730e1a1b9e0e78a1e1dc4daabfe0 (patch)
treebe10d61850c3cc28faac61c2b8a84ee7074d5f3f
parentdc3b976f3393d7a3fb75b349418fc8ee2c9142bd (diff)
downloaddracut-d5fd030cc285730e1a1b9e0e78a1e1dc4daabfe0.tar.gz
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.
-rwxr-xr-xmodules.d/90crypt/module-setup.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
index 639d9cdd..fce898f8 100755
--- a/modules.d/90crypt/module-setup.sh
+++ b/modules.d/90crypt/module-setup.sh
@@ -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