]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: stop systemd-udevd before soft-reboot
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Apr 2025 08:31:05 +0000 (17:31 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 23 Apr 2025 01:48:51 +0000 (10:48 +0900)
Otherwise, queued uevents may be lost on soft-reboot.

Similar to f89985ca494b79b2beed47e1f10d46ef2d59ce3e, but for
systemd-udevd.

units/systemd-udevd.service.in

index 8e343ef836a2dc2e2bb0fbef3c4f2b8c25330540..ef604e9215707d8155cb3f6b7b826d61f1f33e19 100644 (file)
@@ -16,6 +16,14 @@ Before=sysinit.target
 Wants=systemd-udev-load-credentials.service
 ConditionPathIsReadWrite=/sys
 
+# To avoid systemd-udevd being SIGKILLed during a soft reboot,
+# and causing queued uevents to be lost.
+# 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
+
 [Service]
 CapabilityBoundingSet=~CAP_SYS_TIME CAP_WAKE_ALARM
 Delegate=pids