From a2193b71f7be75f719eec29faacae36ab25e9147 Mon Sep 17 00:00:00 2001 From: Laszlo Gombos Date: Fri, 5 Jul 2024 14:17:00 -0400 Subject: [PATCH] fix(systemd-pcrphase): make tpm2-tss an optional dependency --- modules.d/01systemd-pcrphase/module-setup.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules.d/01systemd-pcrphase/module-setup.sh b/modules.d/01systemd-pcrphase/module-setup.sh index 922711709..3016d7e44 100755 --- a/modules.d/01systemd-pcrphase/module-setup.sh +++ b/modules.d/01systemd-pcrphase/module-setup.sh @@ -21,7 +21,17 @@ check() { # Module dependency requirements. depends() { # This module has external dependency on other module(s). - echo systemd tpm2-tss + + local deps + deps="systemd" + + # optional dependencies + module="tpm2-tss" + module_check $module > /dev/null 2>&1 + if [[ $? == 255 ]]; then + deps+=" $module" + fi + echo "$deps" # Return 0 to include the dependent module(s) in the initramfs. return 0 -- 2.47.3