]> 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)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 17 May 2025 11:43:20 +0000 (12:43 +0100)
Otherwise, queued uevents may be lost on soft-reboot.

Similar to f89985ca494b79b2beed47e1f10d46ef2d59ce3e, but for
systemd-udevd.

(cherry picked from commit 0d1819e791a97367c2c0cead738111cfcc1e7491)
(cherry picked from commit af18de3f7f65a22d0dacbb6d35345f5199a56172)

units/systemd-udevd.service.in

index f4a44820880daaad11f98e1139e66c805860c250..2f5f82e7ed345ab5a0c6e94cbbfef3d9ed87ccf5 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