]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
90crypt: pull in remote-cryptsetup.target enablement
authorJonathan Lebon <jonathan@jlebon.com>
Thu, 12 Nov 2020 16:27:39 +0000 (11:27 -0500)
committerDaniel Molkentin <daniel@molkentin.de>
Sat, 14 Nov 2020 14:30:34 +0000 (15:30 +0100)
This should've been part of #964. As mentioned there, the
`initrd-cryptsetup.target` approach was reverted in the end, and we went
back to relying in `remote-cryptsetup.target`:

https://github.com/systemd/systemd/pull/17467

So we do need to ship the enablement symlink for it.

modules.d/90crypt/module-setup.sh

index e3d6338f182c1c60550d295c9209dd4f08f58fc6..58e5f34e650ce47919293ca4dd59ead412952c5c 100755 (executable)
@@ -144,6 +144,8 @@ install() {
     inst_script "$moddir/crypt-run-generator.sh" "/sbin/crypt-run-generator"
 
     if dracut_module_included "systemd"; then
+        # the cryptsetup targets are already pulled in by 00systemd, but not
+        # the enablement symlinks
         inst_multiple -o \
                       $systemdutildir/system-generators/systemd-cryptsetup-generator \
                       $systemdutildir/systemd-cryptsetup \
@@ -151,6 +153,8 @@ install() {
                       $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
     fi