[Nut-upsuser] Udev rules troubles: incorrect ACTION expression?

Arnaud Quette aquette.dev at gmail.com
Sat Jul 23 01:10:33 UTC 2011


2011/7/22 Sergei V. Dubrov <dubrov at inp.nsk.su>

> G'day!
>
> On 21 Jul 2011 at 9:23, Petr Kub'anek wrote:
>
> > Hi Sergei,
> >
> > you can get udev debugging using:
> >
> > root at host:~# /etc/init.d/udev stop
> > root at host:~# udevd -debug
> > 1288130388.961886 [26940] udev_device_new_from_syspath: ...
> >
> > This might shed some light into syntax issues..
>
> As it turned out the ability to understand the expression
> ACTION!="add|change" became possible for udev 109 and newer:
>
> http://git.kernel.org/?p=linux/hotplug/udev.git;a=shortlog;h=refs/tags/109
>
> (make ACTION!="add|change" working)
>
> For example, in @{SL5/RHEL5/Centos5} udev is 097 version, in @SL6 - 147, in
> @gentoo-rolling - 171. XenServer 5.6 SP2 has udev 095.
>
> I think it would be appropriate to modify the contents of 52-nut-
> usbups.rules in the NUT sources to support for a different version of udev.
>

well, it's sometimes hard to stand the pace of opensource devs.
adding legacy support makes it sometime impossible, and distract from
ongoing developments.
but patches are always welcome ;-)

I assume xenserver 5.6 is only a RHEL 5.6 with xen bundled (and some more),
so the solution to your issue is:
sed -i 's|ATTR|SYSFS|g' /etc/udev/rules.d/52-nut-usbups.rules
sed -i 's|add\|change|add|g' /etc/udev/rules.d/52-nut-usbups.rules

you already had the 2nd, and Petr pointed you the direction of the 1rst...

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20110723/a483c71b/attachment.html>


More information about the Nut-upsuser mailing list