]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: do not soft-reboot before soft-reboot.target reached 32880/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 May 2024 02:38:16 +0000 (11:38 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 May 2024 03:31:00 +0000 (12:31 +0900)
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.

units/soft-reboot.target
units/systemd-soft-reboot.service

index 6a6c772875e85735bf15ea9e1feccdd1abca84ff..4bca192454d05d2e16ed8a14ee80107450fd9660 100644 (file)
 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
index 35ba3a9fc41269ed22696835f5136d41faf7825f..da9f463821fb317f36e41e6b87347e3972c907c8 100644 (file)
@@ -11,6 +11,5 @@
 Description=Reboot System Userspace
 Documentation=man:systemd-soft-reboot.service(8)
 DefaultDependencies=no
-Requires=shutdown.target umount.target final.target
-After=shutdown.target umount.target final.target
+Requires=soft-reboot.target
 SuccessAction=soft-reboot-force