teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0562-units-add-Install-section-to-remote-cryptsetup.targe.patch

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