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