From: Laszlo Gombos Date: Tue, 16 Apr 2024 19:17:47 +0000 (-0400) Subject: fix(crypt): add systemd-ask-password dependency if systemd is used X-Git-Tag: 102~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=caafea4e80305306d5aa8cd7540698a1932629dc;p=thirdparty%2Fdracut-ng.git fix(crypt): add systemd-ask-password dependency if systemd is used --- diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh index d5ac45ba2..5dd6f19a1 100755 --- a/modules.d/90crypt/module-setup.sh +++ b/modules.d/90crypt/module-setup.sh @@ -31,6 +31,9 @@ depends() { deps+=" tpm2-tss" fi fi + if dracut_module_included "systemd"; then + deps+=" systemd-ask-password" + fi echo "$deps" return 0 } @@ -167,13 +170,10 @@ install() { "$tmpfilesdir"/cryptsetup.conf \ "$systemdutildir"/system-generators/systemd-cryptsetup-generator \ "$systemdutildir"/systemd-cryptsetup \ - "$systemdsystemunitdir"/systemd-ask-password-console.path \ - "$systemdsystemunitdir"/systemd-ask-password-console.service \ "$systemdsystemunitdir"/cryptsetup.target \ "$systemdsystemunitdir"/sysinit.target.wants/cryptsetup.target \ "$systemdsystemunitdir"/remote-cryptsetup.target \ - "$systemdsystemunitdir"/initrd-root-device.target.wants/remote-cryptsetup.target \ - systemd-ask-password systemd-tty-ask-password-agent + "$systemdsystemunitdir"/initrd-root-device.target.wants/remote-cryptsetup.target fi # Install required libraries.