On 07/06/2017 02:38 AM, Charles Lepple wrote:> On Jul 5, 2017, at 7:23 PM, Manuel Wolfshant wrote: >>> Manuel: did you happen to regenerate the udev files, or use one of the Buildbot tarballs? We typically don't bother to do that until "make dist" before a release (since the rules files are generated from *.in files based on configure parameters), so your package might still have the rules file from 2.7.4 (which does not include protocol 1330). >> yes, the package installed by Mr. Coletti includes the new rules: > Thanks for checking. (I really should set up a Fedora VM and/or learn how to use alien to check on things like this.)I was tempted to say that alien sucks donkey balls but that would not be polite, would it ? Beware that despite the heavy backporting done by RH, fedora is far ahead of RHEL 7 and very far ahead of RHEL 6 ( especially in terms of libraries )> > Does udev automatically reload when the rules files change? The Debian/Ubuntu packages are supposed to run "udevadm trigger --subsystem-match=usb --action=change" as part of the postinst.I've stolen from the fedora package the following gem which , AFAIK ( I am no udev wizard.. ) does the same thing: postinstall scriptlet (using /bin/sh): /sbin/ldconfig udevadm control --reload ||:> (I think udev rescans the rules when a device is plugged in, so unplugging and re-plugging the USB cable should work, too.)you are 100% right here, AFAIK
> On Jul 5, 2017, at 7:45 PM, Manuel Wolfshant <wolfy at nobugconsulting.ro> wrote: > > udevadm control --reload ||:from the man page: --reload Signal systemd-udevd to reload the rules files and other databases like the kernel module index. Reloading rules and databases does not apply any changes to already existing devices; the new configuration will only be applied to new events. So that might not be sufficient for devices that are plugged in at the time the package is installed.
On 07/06/2017 02:50 AM, Charles Lepple wrote:>> On Jul 5, 2017, at 7:45 PM, Manuel Wolfshant<wolfy at nobugconsulting.ro> wrote: >> >> udevadm control --reload ||: > from the man page: > > --reload > Signal systemd-udevd to reload the rules files and other databases like the kernel module index. Reloading rules and databases does not apply any changes to already existing devices; the new configuration will only be applied to new events. > > So that might not be sufficient for devices that are plugged in at the time the package is installed.Thanks for the heads up. Docs say: I've installed udev rules and want udev to do something about it. udevadm trigger --action=change *and* Depend on udev (you can't udevadm when udev is unconfigured) The action argument is of utmost importance. Without it, the kernel will tell udev to treat all devices as *NEW*. This will have lots of side-effects you are probably not expecting. "change" is completely safe. It tells udev just to refresh devices, and make sure everything's as it should be. So I have changed my spec file to issue the trigger command you mentioned earlier. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170706/7d22f189/attachment.html>