On Thu, 2006-10-12 at 13:26 +0200, Jö Fahlke wrote: 
> Package: udev
> Version: 0.100-2
> Severity: normal
> Tags: patch
> 
> My Epson scanner is not assigned to group "scanner" when I switch it
> on and scan the SCSI bus.  This is because it identifies itself as
> type 3 (processor) and vendor "EPSON", but permissions.rules matches
> for vender "Epson".
> 
> This patch solve the problem for me:
> ======================================================================
> --- /etc/udev/permissions.rules       2006/09/21 18:37:41     1.6
> +++ /etc/udev/permissions.rules       2006/10/12 10:49:09
> @@ -25,6 +25,7 @@
>  SUBSYSTEMS=="scsi", ATTRS{type}=="1",                                
> GROUP="tape"
>  SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP",   GROUP="scanner"
>  SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson",        
> GROUP="scanner"
> +SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON",        
> GROUP="scanner"
>  SUBSYSTEMS=="scsi", ATTRS{type}=="5",                                
> GROUP="cdrom"
>  SUBSYSTEMS=="scsi", ATTRS{type}=="6",                                
> GROUP="scanner"
>  
> ======================================================================
> 
> Note that some way to match values in a case insensitive manner would
> probably allow a more general fix which avoids similiar problems with
> other vendors.

fnmatch() which has a FNM_CASEFOLD option. We could use this but I don't
know a nice way to specify it in the rule key. For now you could just do
ugly things like:
  ATTRS{vendor}=="E[Pp][Ss][Oo][Nn]"

Kay


Reply via email to