]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(tpm2-tss): add tpm2 requirement
authorJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 30 Apr 2021 12:43:54 +0000 (12:43 +0000)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 3 May 2021 08:08:51 +0000 (10:08 +0200)
modules.d/91tpm2-tss/module-setup.sh

index e17938309042db4ad0f6fd0e790e0a1c62d360ee..28af22a319d2b648d9ff82ff0fa60c4c937956f9 100755 (executable)
@@ -5,6 +5,9 @@
 # Prerequisite check(s) for module.
 check() {
 
+    # If the binary(s) requirements are not fulfilled the module can't be installed.
+    require_binaries tpm2 || return 1
+
     # Return 255 to only include the module, if another module requires it.
     return 255
 
@@ -52,12 +55,4 @@ install() {
         {"tls/$_arch/",tls/,"$_arch/",}"libcurl.so.*" \
         {"tls/$_arch/",tls/,"$_arch/",}"libjson-c.so.*"
 
-    # Install the hosts local user configurations if enabled.
-    if [[ $hostonly ]]; then
-        inst_multiple -H -o \
-            "$udevrulesdir"/60-tpm-udev.rules \
-            /etc/tpm2-tss/fapi-config.json \
-            "/etc/tpm2-tss/fapi-profiles/*.json"
-    fi
-
 }