Blob Blame History Raw
From 923299bbe6aa2c22a2592dcbcae722f273e7a5dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 12 Oct 2017 22:13:03 +0200
Subject: [PATCH] units: add [Install] section to remote-cryptsetup.target

This makes this target the same as remote-fs.target in this regard. In practice
it probably doesn't make that much difference, because all encrypted devices
that are part of remote-fs.target (marked with _netdev) will be used for mount
points, so they will be pulled in anyway individually, but with this change any
such device will be configured, even if it is not pulled by any other unit.

Cherry-picked from: 8f462b074eb9830d6d5029f70c9010ce50e68357
Resolves: #1477757
---
 system-preset/90-systemd.preset | 1 +
 units/remote-cryptsetup.target  | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/system-preset/90-systemd.preset b/system-preset/90-systemd.preset
index 24963f0623..a011ec67ab 100644
--- a/system-preset/90-systemd.preset
+++ b/system-preset/90-systemd.preset
@@ -9,6 +9,7 @@
 # generally follow a default-off policy.
 
 enable remote-fs.target
+enable remote-cryptsetup.target
 enable machines.target
 
 enable getty@.service
diff --git a/units/remote-cryptsetup.target b/units/remote-cryptsetup.target
index 60943bd1cb..c306d521f7 100644
--- a/units/remote-cryptsetup.target
+++ b/units/remote-cryptsetup.target
@@ -8,3 +8,9 @@
 [Unit]
 Description=Remote Encrypted Volumes
 Documentation=man:systemd.special(7)
+After=remote-cryptsetup-pre.target
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Install]
+WantedBy=multi-user.target