dd65c9
From 923299bbe6aa2c22a2592dcbcae722f273e7a5dd Mon Sep 17 00:00:00 2001
dd65c9
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
dd65c9
Date: Thu, 12 Oct 2017 22:13:03 +0200
dd65c9
Subject: [PATCH] units: add [Install] section to remote-cryptsetup.target
dd65c9
dd65c9
This makes this target the same as remote-fs.target in this regard. In practice
dd65c9
it probably doesn't make that much difference, because all encrypted devices
dd65c9
that are part of remote-fs.target (marked with _netdev) will be used for mount
dd65c9
points, so they will be pulled in anyway individually, but with this change any
dd65c9
such device will be configured, even if it is not pulled by any other unit.
dd65c9
dd65c9
Cherry-picked from: 8f462b074eb9830d6d5029f70c9010ce50e68357
dd65c9
Resolves: #1477757
dd65c9
---
dd65c9
 system-preset/90-systemd.preset | 1 +
dd65c9
 units/remote-cryptsetup.target  | 6 ++++++
dd65c9
 2 files changed, 7 insertions(+)
dd65c9
dd65c9
diff --git a/system-preset/90-systemd.preset b/system-preset/90-systemd.preset
c62b8e
index 24963f0623..a011ec67ab 100644
dd65c9
--- a/system-preset/90-systemd.preset
dd65c9
+++ b/system-preset/90-systemd.preset
dd65c9
@@ -9,6 +9,7 @@
dd65c9
 # generally follow a default-off policy.
dd65c9
 
dd65c9
 enable remote-fs.target
dd65c9
+enable remote-cryptsetup.target
dd65c9
 enable machines.target
dd65c9
 
dd65c9
 enable getty@.service
dd65c9
diff --git a/units/remote-cryptsetup.target b/units/remote-cryptsetup.target
c62b8e
index 60943bd1cb..c306d521f7 100644
dd65c9
--- a/units/remote-cryptsetup.target
dd65c9
+++ b/units/remote-cryptsetup.target
dd65c9
@@ -8,3 +8,9 @@
dd65c9
 [Unit]
dd65c9
 Description=Remote Encrypted Volumes
dd65c9
 Documentation=man:systemd.special(7)
dd65c9
+After=remote-cryptsetup-pre.target
dd65c9
+DefaultDependencies=no
dd65c9
+Conflicts=shutdown.target
dd65c9
+
dd65c9
+[Install]
dd65c9
+WantedBy=multi-user.target