25 Jun
2016
25 Jun
'16
18:50
25.06.2016 14:17, Adam Mizerski пишет:
Hi,
What are the guidelines for packaging udev rules?
1) So far I've found that files should be placed in %{_udevrulesdir}.
Yes.
2) Should the package call "udevadm control --reload" in %post and %postun? I've found that there's a macro for this %udev_rules_update [1]. But I couldn't find any package doing that.
udevd checks rules directories timestamp every 3 seconds and reloads rules if it changed. Updating file via RPM is guaranteed to update directory timestamp because RPM creates temporary file first. So the question is whether you care about 3 seconds window enough to reload rules manually.
[1] https://build.opensuse.org/package/view_file/openSUSE:Factory/systemd/macros...