On Sun, 17 Apr 2011 16:38:18 +0200 Julien BLACHE <jbla...@debian.org> wrote:
> Alexander Galanin <a...@galanin.nnov.ru> wrote: > > Hi, > > Your patch makes 2 unrelated changes. Could you please clarify which is > the one that makes it work? > > > @@ -24,10 +24,10 @@ > > # the sane-devel mailing list (sane-de...@lists.alioth.debian.org). > > # > > ACTION!="add", GOTO="libsane_rules_end" > > -ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev" > > +ENV{DEVTYPE}=="usb_interface", GOTO="libsane_create_usb_dev" > > SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin" > > -SUBSYSTEM=="usb_device", GOTO="libsane_usb_rules_begin" > > -SUBSYSTEM!="usb_device", GOTO="libsane_usb_rules_end" > > +SUBSYSTEM=="usb", GOTO="libsane_usb_rules_begin" > > +SUBSYSTEM!="usb", GOTO="libsane_usb_rules_end" > > > > # Kernel >= 2.6.22 jumps here > > LABEL="libsane_create_usb_dev" > > This part may actually be somewhat right, although the usb_interface > part seems wrong. This is the output of udevadm --query all for my scanner (Mustek BearPaw 2448TA Pro): P: /devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5:1.0 E: UDEV_LOG=3 E: DEVPATH=/devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5:1.0 E: DEVTYPE=usb_interface E: DEVICE=/proc/bus/usb/001/021 E: PRODUCT=55f/409/100 E: TYPE=0/0/0 E: INTERFACE=255/255/255 E: MODALIAS=usb:v055Fp0409d0100dc00dsc00dp00icFFiscFFipFF E: SUBSYSTEM=usb E: libsane_matched=yes So I think that DEVTYPE and SUBSYSTEM values in the rule should be changed. > > @@ -1214,6 +1214,6 @@ > > KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", > > ATTRS{model}=="C7670A", ENV{libsane_matched}="yes" > > LABEL="libsane_scsi_rules_end" > > > > -ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw > > $env{DEVNAME}" > > +ENV{libsane_matched}=="yes", GROUP = "scanner" > > > > LABEL="libsane_rules_end" > > And that is absolutely not right. We've moved away from using GROUP= and > use ACLs instead. $env{DEVNAME} is empty in my case, so I used the another way to set permissions. If you know the name of variable containing correct device name, you can use it instead of $env{DEVNAME} in seftacl call. -- Alexander Galanin -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org