rpm: mark udevd for reloading when an rules file is installed/updated

Then, we can avoid using udevadm (especially udev control socket) in
processing rpm.
This commit is contained in:
Yu Watanabe
2025-01-22 20:44:38 +00:00
committed by Luca Boccassi
parent 16f99f5be9
commit 4fd81d03e2
2 changed files with 2 additions and 6 deletions
+1 -3
View File
@@ -70,9 +70,7 @@ assert(rpm.execute("systemd-tmpfiles", "--create"))
%transfiletriggerin -P 1000600 udev -p <lua> -- {{UDEV_RULES_DIR}}
-- This script will automatically update udev with new rules if files
-- have been installed or updated in {{UDEV_RULES_DIR}}.
if posix.access("/run/udev/control") then
assert(rpm.execute("udevadm", "control", "--reload"))
end
assert(rpm.execute("{{SYSTEMD_UPDATE_HELPER_PATH}}", "mark-reload-system-units", "systemd-udevd.service"))
%transfiletriggerin -P 1000500 -p <lua> -- {{SYSCTL_DIR}}
-- This script will automatically apply sysctl rules if files have been
+1 -3
View File
@@ -75,9 +75,7 @@ fi
%transfiletriggerin -P 1000600 udev -- {{UDEV_RULES_DIR}}
# This script will automatically update udev with new rules if files
# have been installed or updated in {{UDEV_RULES_DIR}}.
if test -e /run/udev/control; then
udevadm control --reload || :
fi
{{SYSTEMD_UPDATE_HELPER_PATH}} mark-reload-system-units systemd-udevd.service || :
%transfiletriggerin -P 1000500 -- {{SYSCTL_DIR}}
# This script will automatically apply sysctl rules if files have been