[Nut-upsdev] nut + usb + udev with kernel 2.6.22

Arnaud Quette aquette.dev at gmail.com
Wed Oct 3 07:00:27 UTC 2007


Guys,

first, thanks for your report.

I suspected such a thing from recent feedback.

Here is what I'm preparing to push:

--- nut-2.2.0~/scripts/udev/nut-usbups.rules.in 2007-02-01
16:23:17.000000000 +0100
+++ nut-2.2.0/scripts/udev/nut-usbups.rules.in  2007-02-02
15:43:42.000000000 +0100
@@ -1,7 +1,11 @@
 # udev rules for the NUT USB drivers

-SUBSYSTEM!="usb_device", GOTO="nut-usbups_rules_end"
 ACTION!="add", GOTO="nut-usbups_rules_end"
+SUBSYSTEM=="usb_device", GOTO="nut-usbups_rules_real"
+SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real"
+BUS!="usb", GOTO="nut-usbups_rules_end"
+
+LABEL="nut-usbups_rules_real"

 # MGE UPS SYSTEMS - usbhid-ups
 SYSFS{idVendor}=="0463", SYSFS{idProduct}=="ffff", MODE="664",
GROUP="@RUN_AS_USER@"

Can you both test it and make some feedback?

2007/9/30, Gilad Arnold <arnold at cs.berkeley.edu>:
> Hi Vamp,
>
> Thanks for the reply. Your patch indeed works, but wouldn't it be too
> permissive in the general case? I mean, we need to cover two specific
> cases, whereas this patch will accept possibly other cases (whenever
> SUBSYSTEM starts with 'usb', and regardless of ENV{DEVTYPE}).
>
> In any case, I believe that the udev rules that ship with nut need to be
> upgrades to work in any of the above situations. How should this be
> pursued?
>
> Gilad
>
>
> On Sat, Sep 29, 2007 at 10:26:15PM +0400, Vamp wrote:
> > Hello, Gilad!
> > You wrote to <nut-upsdev at lists.alioth.debian.org> on Fri, 28 Sep 2007
> > 16:22:00 -0700:
> >
> >> Worse, it was improperly setup
> >> only during udev coldplug, whereas hotplugging worked fine.
> >
> > I had the same problem on my Gentoo Linux machine. SUBSYSTEM needs to be
> > 'usb_device' at hotplug and 'usb' at coldplug. I used an easier patch
> >
> > --- T:\nut\scripts\udev\nut-usbups.rules.in.orig 02.09.2007  23:00:51
> > +++ T:\nut\scripts\udev\nut-usbups.rules.in 02.09.2007  23:00:51
> > @@ -1,6 +1,6 @@
> > # udev rules for the NUT USB drivers
> >
> > -SUBSYSTEM!="usb_device", GOTO="nut-usbups_rules_end"
> > +SUBSYSTEM!="usb*", GOTO="nut-usbups_rules_end"
> > ACTION!="add", GOTO="nut-usbups_rules_end"
> >
> > # MGE UPS SYSTEMS - usbhid-ups
> >
> >
> > With best regards, Vamp.  E-mail: admin at vampik.ru

Arnaud
-- 
Free Software Developer - http://arnaud.quette.free.fr/
Debian Developer - http://people.debian.org/~aquette/
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Ubuntu Media Center (UMC) Project Leader - https://launchpad.net/~umc-team



More information about the Nut-upsdev mailing list