summaryrefslogtreecommitdiffstats
path: root/units/soft-reboot.target
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-05-17 04:38:16 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-05-17 05:31:00 +0200
commit4263d7617f0e6ea741e227db223ac6085479165f (patch)
treecadd6f585623c4978fe1549439db1a02f4e7c005 /units/soft-reboot.target
parentunits: drop dependencies of soft-reboot.target from systemd-journald@.service (diff)
downloadsystemd-4263d7617f0e6ea741e227db223ac6085479165f.tar.xz
systemd-4263d7617f0e6ea741e227db223ac6085479165f.zip
units: do not soft-reboot before soft-reboot.target reached
Otherwise, at the time systemd-soft-reboot.service succeeds, services which has Conflicts= and Before=soft-reboot.target may not be stopped yet, and may be SIGKILLed. Especially, systemd-journald.service has the dependencies, thus journal may be corrupted. See #32223. Follow-up for 13ffc60749df0ca7c76cfcac317b41a05679b364. Fixes #32834.
Diffstat (limited to 'units/soft-reboot.target')
-rw-r--r--units/soft-reboot.target4
1 files changed, 3 insertions, 1 deletions
diff --git a/units/soft-reboot.target b/units/soft-reboot.target
index 6a6c772875..4bca192454 100644
--- a/units/soft-reboot.target
+++ b/units/soft-reboot.target
@@ -11,8 +11,10 @@
Description=Reboot System Userspace
Documentation=man:systemd.special(7)
DefaultDependencies=no
+Requires=shutdown.target umount.target final.target
+After=shutdown.target umount.target final.target
Requires=systemd-soft-reboot.service
-After=systemd-soft-reboot.service
+Before=systemd-soft-reboot.service
AllowIsolate=yes
JobTimeoutSec=30min
JobTimeoutAction=soft-reboot-force