ffd055
From aa4cf6df94dd3a858144040138d970a57c701a8d Mon Sep 17 00:00:00 2001
ffd055
From: Jonathan Lebon <jonathan@jlebon.com>
ffd055
Date: Thu, 12 Nov 2020 11:27:39 -0500
ffd055
Subject: [PATCH] 90crypt: pull in remote-cryptsetup.target enablement
ffd055
ffd055
This should've been part of #964. As mentioned there, the
ffd055
`initrd-cryptsetup.target` approach was reverted in the end, and we went
ffd055
back to relying in `remote-cryptsetup.target`:
ffd055
ffd055
https://github.com/systemd/systemd/pull/17467
ffd055
ffd055
So we do need to ship the enablement symlink for it.
ffd055
ffd055
(cherry picked from commit a23a4680e7d04d1016e9d5e4b53b1e65f1ca98aa)
ffd055
ffd055
Resolves: #1897384
ffd055
---
ffd055
 modules.d/90crypt/module-setup.sh | 4 ++++
ffd055
 1 file changed, 4 insertions(+)
ffd055
ffd055
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
ffd055
index 1ec59096..a26b6dff 100755
ffd055
--- a/modules.d/90crypt/module-setup.sh
ffd055
+++ b/modules.d/90crypt/module-setup.sh
ffd055
@@ -120,6 +120,8 @@ install() {
ffd055
     inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
ffd055
 
ffd055
     if dracut_module_included "systemd"; then
ffd055
+        # the cryptsetup targets are already pulled in by 00systemd, but not
ffd055
+        # the enablement symlinks
ffd055
         inst_multiple -o \
ffd055
                       $systemdutildir/system-generators/systemd-cryptsetup-generator \
ffd055
                       $systemdutildir/systemd-cryptsetup \
ffd055
@@ -127,6 +129,8 @@ install() {
ffd055
                       $systemdsystemunitdir/systemd-ask-password-console.service \
ffd055
                       $systemdsystemunitdir/cryptsetup.target \
ffd055
                       $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
ffd055
+                      $systemdsystemunitdir/remote-cryptsetup.target \
ffd055
+                      $systemdsystemunitdir/initrd-root-device.target.wants/remote-cryptsetup.target \
ffd055
                       systemd-ask-password systemd-tty-ask-password-agent
ffd055
         inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator
ffd055
     fi
ffd055