naccyde / rpms / systemd

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