[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: udev not assigning group correctly for scanner

On Wed, Jul 14, 2010 at 08:09:05PM -0700, briand@aracnet.com wrote:
> device `epson2:/dev/sg1' is a Epson GT-9700 flatbed scanner
> crw-rw----+ 1 root root 21, 1 Jul 14 18:57 /dev/sg1
> here's the rule it looks like it should be matching :
> # Epson Perfection 2450 | Epson GT-9700F | Epson Perfection 2450 PHOTO
> ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0112", MODE="0664",
> GROUP="scanner", ENV{libsane_matched}="yes"

Where should $libsane_matched be set?

> Because, you know, that's the scanner I have :-)
> So I'm not clear on how I can figure out whether a rule was matched at
> all, and if it was, which one was matched.

1. Have you reloaded udev rules after your changes?

  udevadm control --reload-rules

On Lenny:

  udevadm control --reload_rules

2. udevmonitor (udevadm monitor) can help you see what you actually get
with the events. Use the option --env.

3. You seem to have quite a few conditions. Consider removing some of
them to see which one is the offender that does not apply.

> Also, what's the best way to add rules to /etc/udev to force "my" rules
> to be checked first.  Do I simply add a rules file with a low prefix
> number ??

Are there any other rules that apply?

Tzafrir Cohen         | tzafrir@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir@cohens.org.il |                    |  best
tzafrir@debian.org    |                    | friend

Reply to: