From 0d1819e791a97367c2c0cead738111cfcc1e7491 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 7 Apr 2025 17:31:05 +0900 Subject: [PATCH] units: stop systemd-udevd before soft-reboot Otherwise, queued uevents may be lost on soft-reboot. Similar to f89985ca494b79b2beed47e1f10d46ef2d59ce3e, but for systemd-udevd. --- units/systemd-udevd.service.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in index 8e343ef836a..ef604e92157 100644 --- a/units/systemd-udevd.service.in +++ b/units/systemd-udevd.service.in @@ -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 -- 2.47.3