]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
unit: make journald stopped on soft-reboot before broadcasting SIGKILL
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Nov 2023 23:32:22 +0000 (08:32 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 28 Nov 2023 09:28:17 +0000 (18:28 +0900)
Workaround for #30195.

units/systemd-journald.service.in
units/systemd-journald@.service.in

index 1c36ec8903c8824e0b8e689dcca4b8f89e89da2d..37eeabc5103776c5b49f3ac5aea8279af5f463dd 100644 (file)
@@ -15,6 +15,11 @@ Requires=systemd-journald.socket
 After=systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-audit.socket syslog.socket
 Before=sysinit.target
 
+# To avoid journald SIGKILLed during soft-reboot and corrupting journals.
+# See https://github.com/systemd/systemd/issues/30195
+Before=soft-reboot.target
+Conflicts=soft-reboot.target
+
 # Mount and swap units need the journal socket units. If they were removed by
 # an isolate request the mount and swap units would be removed too, hence let's
 # exclude systemd-journald and its sockets from isolate requests.
index b705ce08ff5cfc69e4b5b263a6a9cb1ec0f0adaa..c3bcb0853359131194d2b72fa107dae5f9443eab 100644 (file)
@@ -13,6 +13,11 @@ Documentation=man:systemd-journald.service(8) man:journald.conf(5)
 Requires=systemd-journald@%i.socket systemd-journald-varlink@%i.socket
 After=systemd-journald@%i.socket systemd-journald-varlink@%i.socket
 
+# To avoid journald SIGKILLed during soft-reboot and corrupting journals.
+# See https://github.com/systemd/systemd/issues/30195
+Before=soft-reboot.target
+Conflicts=soft-reboot.target
+
 [Service]
 CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID CAP_MAC_OVERRIDE
 DevicePolicy=closed