summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-05-22 17:03:42 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-05-22 17:08:14 +0200
commit37143fdf5a354123a9dca46ca690e7792d30bee9 (patch)
tree8894ea89cd2ab1e7dd91668ea488118c53a07adc
parentman: swap the order of soft-reboot.service and .target (diff)
downloadsystemd-37143fdf5a354123a9dca46ca690e7792d30bee9.tar.xz
systemd-37143fdf5a354123a9dca46ca690e7792d30bee9.zip
units: stop systemd-journald before systemd-soft-reboot.service
Typically, soft-reboot.target is never reached. So, without this change, systemd-journald may be killed by PID1 on soft-reboot, and may cause journal corruption.
-rw-r--r--units/systemd-journald.service.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
index 2b340f4ea7..96362f5730 100644
--- a/units/systemd-journald.service.in
+++ b/units/systemd-journald.service.in
@@ -17,7 +17,10 @@ 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
+# Note, typically soft-reboot.target will be never reached,
+# and systemd-soft-reboot.service will trigger soft-reboot.
+# Hence, this must be stopped before systemd-soft-reboot.service.
+Before=soft-reboot.target systemd-soft-reboot.service
Conflicts=soft-reboot.target
# Mount and swap units need the journal socket units. If they were removed by