summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd/0004-Set-switch-to-configuration-hints-for-some-units.patch
blob: b25f65187d79b9f0fdd18c916f42b6d32a869c11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From fa5fabd0123f2d5be7efa877f8dbbf0ae7b929da Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 15:48:19 +0100
Subject: [PATCH 4/7] Set switch-to-configuration hints for some units
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Target units like local-fs.target need ‘X-StopOnReconfiguration=yes’
to ensure dependencies *on* that target properly take into account the
dependencies *of* the target.

‘X-RestartIfChanged=no’ is necessary for systemd-journald.service
because restarting it causes services connected to journald to stop
logging.

‘X-RestartIfChanged=no’ is necessary for systemd-user-sessions.service
to prevent all user sessions from being killed when this unit changes.
---
 units/local-fs.target                  | 2 ++
 units/remote-fs.target                 | 2 ++
 units/systemd-journald.service.in      | 5 +++++
 units/systemd-user-sessions.service.in | 3 +++
 4 files changed, 12 insertions(+)

diff --git a/units/local-fs.target b/units/local-fs.target
index ee02e4e..63ae843 100644
--- a/units/local-fs.target
+++ b/units/local-fs.target
@@ -11,3 +11,5 @@ Documentation=man:systemd.special(7)
 After=local-fs-pre.target
 OnFailure=emergency.target
 OnFailureIsolate=yes
+
+X-StopOnReconfiguration=yes
diff --git a/units/remote-fs.target b/units/remote-fs.target
index e867b8d..02462b4 100644
--- a/units/remote-fs.target
+++ b/units/remote-fs.target
@@ -10,5 +10,7 @@ Description=Remote File Systems
 Documentation=man:systemd.special(7)
 After=remote-fs-pre.target remote-fs-setup.target
 
+X-StopOnReconfiguration=yes
+
 [Install]
 WantedBy=multi-user.target
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
index ab2e50c..9563a7d 100644
--- a/units/systemd-journald.service.in
+++ b/units/systemd-journald.service.in
@@ -24,3 +24,8 @@ CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG C
 # Increase the default a bit in order to allow many simultaneous
 # services being run since we keep one fd open per service.
 LimitNOFILE=16384
+
+# Don't restart journald, since that causes services connected to
+# journald to stop logging (see
+# https://bugs.freedesktop.org/show_bug.cgi?id=56043).
+X-RestartIfChanged=no
diff --git a/units/systemd-user-sessions.service.in b/units/systemd-user-sessions.service.in
index 0869e73..b6ed958 100644
--- a/units/systemd-user-sessions.service.in
+++ b/units/systemd-user-sessions.service.in
@@ -15,3 +15,6 @@ Type=oneshot
 RemainAfterExit=yes
 ExecStart=@rootlibexecdir@/systemd-user-sessions start
 ExecStop=@rootlibexecdir@/systemd-user-sessions stop
+
+# Restart kills all active sessions.
+X-RestartIfChanged=no
-- 
1.8.1