units: stop systemd-udevd before soft-reboot

Otherwise, queued uevents may be lost on soft-reboot.

Similar to f89985ca49, but for
systemd-udevd.
This commit is contained in:
Yu Watanabe
2025-04-23 10:48:51 +09:00
parent b50f6dbe57
commit 0d1819e791
+8
View 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