]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(crypt): add systemd-ask-password dependency if systemd is used
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Tue, 16 Apr 2024 19:17:47 +0000 (15:17 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sat, 20 Apr 2024 19:55:33 +0000 (15:55 -0400)
modules.d/90crypt/module-setup.sh

index d5ac45ba223eeecd74497ad6a92eafa6e7b90d06..5dd6f19a126eaef94eb0be47925aafcd74dcf043 100755 (executable)
@@ -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.