kopia lustrzana https://gitlab.com/sane-project/backends
* tools/hotplug: added the hotplug script used by the Debian package, with a quick README.
* tools/README: updated to mention the hotplug/ directory.merge-requests/1/head
rodzic
34f8a413bf
commit
2991c344db
|
@ -1,3 +1,8 @@
|
||||||
|
2004-02-28 Julien Blache <jb@jblache.org>
|
||||||
|
* tools/hotplug: added the hotplug script used by the Debian
|
||||||
|
package, with a quick README.
|
||||||
|
* tools/README: updated to mention the hotplug/ directory.
|
||||||
|
|
||||||
2004-02-27 Matthew Duggan <stauff1@users.sourceforge.net>
|
2004-02-27 Matthew Duggan <stauff1@users.sourceforge.net>
|
||||||
|
|
||||||
* backend/canon_pp.c: Add more debug output to help resolve bug #300524
|
* backend/canon_pp.c: Add more debug output to help resolve bug #300524
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
2003-06-18
|
2004-02-28
|
||||||
|
|
||||||
This directory contains various tools that may be useful:
|
This directory contains various tools that may be useful:
|
||||||
|
|
||||||
|
hotplug/:
|
||||||
|
hotplug script and config file used to change the persmissions
|
||||||
|
on the libusb "device nodes" when a scanner is plugged in.
|
||||||
|
Please read the README file in this directory for instructions.
|
||||||
|
|
||||||
sane-find-scanner:
|
sane-find-scanner:
|
||||||
Attempts to find a SCSI scanner attached to your system.
|
Attempts to find a SCSI scanner attached to your system.
|
||||||
Invoke with "sane-find-scanner -h" to get command-line
|
Invoke with "sane-find-scanner -h" to get command-line
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
README for the hotplug scripts for sane-backends :
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
If you intend to use a USB scanner with libusb, you should install the hotplug
|
||||||
|
package, and then take the following steps :
|
||||||
|
o copy the libsane.usermap and libusbscanner files from this directory to
|
||||||
|
/etc/hotplug/usb/
|
||||||
|
o add scanner to /etc/hotplug/blacklist so that the scanner.o kernel driver
|
||||||
|
won't be loaded by hotplug.
|
||||||
|
o edit /etc/hotplug/usb/libsane.usermap, and add a line similar to the one
|
||||||
|
given at the top of the file, replacing 0xVVVV and 0xPPPP with the vendor ID
|
||||||
|
and the product ID of your scanner, respectively.
|
||||||
|
|
||||||
|
The vendor ID and product ID of your scanner can be obtained by running
|
||||||
|
sane-find-scanner (you might need to run it as root).
|
||||||
|
|
||||||
|
Please note that the scanner.o (or scanner.ko in Linux 2.6) kernel module is
|
||||||
|
now deprecated and marked as obsolete in Linux 2.6. It is recommended to switch
|
||||||
|
to libusb.
|
||||||
|
|
||||||
|
If the hotplug support doesn't work for you once you have taken the steps
|
||||||
|
described above, check that your kernel has been built with hotplug support.
|
||||||
|
Otherwise, you'll need to rebuild your kernel.
|
||||||
|
|
||||||
|
-- Julien BLACHE <jb@jblache.org>, Sat, 28 Feb 2004 10:01:02 +0000
|
|
@ -0,0 +1,14 @@
|
||||||
|
# This file is part of sane-backends.
|
||||||
|
#
|
||||||
|
# The entries below are used to detect a USB scanner when it's plugged in
|
||||||
|
# and then run the libusbscanner script to change the ownership and
|
||||||
|
# permissions on the "device node" used by libusb.
|
||||||
|
#
|
||||||
|
# The 0x0003 match flag means the device is matched by its vendor and
|
||||||
|
# product IDs.
|
||||||
|
#
|
||||||
|
# Sample entry (replace 0xVVVV and 0xPPPP with vendor ID and product ID respectively) :
|
||||||
|
# libusbscanner 0x0003 0xVVVV 0xPPPP 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
|
||||||
|
#
|
||||||
|
# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
|
||||||
|
#
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This file is part of sane-backends.
|
||||||
|
#
|
||||||
|
# This script changes the permissions and ownership of a USB device under
|
||||||
|
# /proc/bus/usb to grant access to this device to users in the scanner group.
|
||||||
|
#
|
||||||
|
# Ownership is set to root:scanner, permissions are set to 0660.
|
||||||
|
#
|
||||||
|
# Arguments :
|
||||||
|
# -----------
|
||||||
|
# ACTION=[add|remove]
|
||||||
|
# DEVICE=/proc/bus/usb/BBB/DDD
|
||||||
|
# TYPE=usb
|
||||||
|
|
||||||
|
if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
|
||||||
|
chown root:scanner "$DEVICE"
|
||||||
|
chmod 0660 "$DEVICE"
|
||||||
|
fi
|
Ładowanie…
Reference in New Issue