1hotplug/hotplug-ng hook for sane-backends
2-----------------------------------------
3
4The libsane.hotplug script is intended to replace the existing hotplug scripts,
5as those won't be usable with the new hotplug-ng. The libsane.hotplug script
6works with both hotplug and hotplug-ng.  For current Linux kernels, "udev" is
7state of the art, see the "udev" directory instead.
8
9This script is provided in the hope that it will be useful, simpler, faster and
10more extensible than the current usermap approach.
11
12
13INSTALLATION
14------------
15
16Install libsane.hotplug in /etc/hotplug/usb, and make it executable.
17
18Create the directory /etc/sane.d/hotplug and copy libsane.db there.
19
20
21FILE FORMAT
22-----------
23
24The libsane.db contains 5 tab-separated fields:
25
260xVVVV<tab>0xPPPP<tab>root:scanner<tab>0660<tab>optional_script
27
28Fields:
29 - vendor ID
30 - product ID
31 - ownership (user:group)
32 - permissions
33 - path of an optional script to run (it can be omitted)
34
35
36USAGE
37-----
38
39When run by hotplug/hotplug-ng, the libsane.hotplug script will grep for
40^0xVVVV[[:space:]]0xPPPP in /etc/sane.d/hotplug/*.db. If a match is found,
41the settings are applied to the device.
42
43The optional script is then run; this script can access the environment
44variables set by hotplug/hotplug-ng (see the documentation). The libsane.hotplug
45script will also set and export the DEVVID and DEVPID variables, containing the
46vendor and device ID of the scanner (of the form VVVV and PPPP).
47