![](https://secure.gravatar.com/avatar/df8330968b6df8cd1c1942c5fb4b720c.jpg?s=120&d=mm&r=g)
Author: jue Date: 2006-03-05 11:45:28 +0100 (Sun, 05 Mar 2006) New Revision: 877 Modified: crux-2.2/ports/opt/sane/.footprint crux-2.2/ports/opt/sane/Pkgfile crux-2.2/ports/opt/sane/README Log: use udev rules instead of hotplug to set device permissions Modified: crux-2.2/ports/opt/sane/.footprint =================================================================== --- crux-2.2/ports/opt/sane/.footprint 2006-03-05 10:35:50 UTC (rev 876) +++ crux-2.2/ports/opt/sane/.footprint 2006-03-05 10:45:28 UTC (rev 877) @@ -1,8 +1,7 @@ drwxr-xr-x root/root etc/ -drwxr-xr-x root/root etc/hotplug/ -drwxr-xr-x root/root etc/hotplug/usb/ --rw-r--r-- root/root etc/hotplug/usb/libsane.usermap --rwxr-xr-x root/root etc/hotplug/usb/libusbscanner +drwxr-xr-x root/root etc/udev/ +drwxr-xr-x root/root etc/udev/rules.d/ +-rw-r--r-- root/root etc/udev/rules.d/libsane.rules drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/bin/ -rwxr-xr-x root/root usr/bin/gamma4scanimage Modified: crux-2.2/ports/opt/sane/Pkgfile =================================================================== --- crux-2.2/ports/opt/sane/Pkgfile 2006-03-05 10:35:50 UTC (rev 876) +++ crux-2.2/ports/opt/sane/Pkgfile 2006-03-05 10:45:28 UTC (rev 877) @@ -5,7 +5,7 @@ name=sane version=1.0.17 -release=2 +release=3 source=(ftp://ftp.sane-project.org/pub/$name/$name-backends-$version/$name-backends-$version.tar.gz) build () { @@ -19,10 +19,10 @@ make make prefix=$PKG/usr install - install -d $PKG/{etc/hotplug/usb,var/lock} + sh tools/udev/convert-usermap.sh tools/hotplug/libsane.usermap + install -d $PKG/{etc/udev/rules.d,var/lock} install -d -g scanner -m 775 $PKG/var/lock/sane - install -m 755 tools/hotplug/libusbscanner $PKG/etc/hotplug/usb - install -m 644 tools/hotplug/libsane.usermap $PKG/etc/hotplug/usb + install -m 644 libsane.rules $PKG/etc/udev/rules.d rm -r $PKG/usr/{doc,share} } Modified: crux-2.2/ports/opt/sane/README =================================================================== --- crux-2.2/ports/opt/sane/README 2006-03-05 10:35:50 UTC (rev 876) +++ crux-2.2/ports/opt/sane/README 2006-03-05 10:45:28 UTC (rev 877) @@ -10,21 +10,21 @@ 1. To find the vendor/product id of your scanner, run the command: # sane-find-scanner -q - found USB scanner (vendor=0x04a9 [Canon], product=0x2204 [CanoScan] at libusb:002:002 + found USB scanner (vendor=0x04a9, product=0x2204 [CanoScan FB630U] at libusb:001:005 - You need the 'vendor' id (0x04a9) and the 'product' id (0x2204) + You need the 'vendor' id (04a9) and the 'product' id (2204) - 2. Check if /etc/hotplug/usb/libsane.usermap already knows about + 2. Check if /etc/udev/rules.d/libsane.rules already knows about your scanner. If your scanner is not in this list, add a line - like the following, remember to replace 0x04a9 and 0x2204 with + like the following, remember to replace 04a9 and 2204 with your values: - libusbscanner 0x0003 0x04a9 0x2204 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 - - 3. Check the file permissions in /proc/bus/usb after you have plugged + SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="2204", MODE="660", GROUP="scanner" + + 3. Check the file permissions in /dev/bus/usb after you have plugged in your scanner device. - # ls -l /proc/bus/usb/001 + # ls -l /dev/bus/usb/001 total 0 -rw-r--r-- 1 root root 43 Aug 3 10:58 001 -rw-rw---- 1 root scanner 50 Aug 3 10:58 005