Skip to content

Commit 37143fd

Browse files
committed
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.
1 parent a328b24 commit 37143fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

units/systemd-journald.service.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ Before=sysinit.target
1717

1818
# To avoid journald SIGKILLed during soft-reboot and corrupting journals.
1919
# See https://github.com/systemd/systemd/issues/30195
20-
Before=soft-reboot.target
20+
# Note, typically soft-reboot.target will be never reached,
21+
# and systemd-soft-reboot.service will trigger soft-reboot.
22+
# Hence, this must be stopped before systemd-soft-reboot.service.
23+
Before=soft-reboot.target systemd-soft-reboot.service
2124
Conflicts=soft-reboot.target
2225

2326
# Mount and swap units need the journal socket units. If they were removed by

0 commit comments

Comments
 (0)