Extend README.

Remove rc_pre and rc_post, uscanner(4) is disabled by default.
This commit is contained in:
ajacoutot 2010-12-20 11:40:39 +00:00
parent cddf86404d
commit 6f5418df70
3 changed files with 37 additions and 25 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.34 2010/12/11 12:57:37 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.35 2010/12/20 11:40:39 ajacoutot Exp $
COMMENT= API for accessing scanners, backends
DISTNAME= sane-backends-1.0.21
REVISION= 8
REVISION= 9
PATCHFILES= sane-backends-1.0.21-i18n.patch
PATCH_DIST_STRIP= -p1

View File

@ -1,31 +1,51 @@
$OpenBSD: README,v 1.2 2010/12/06 18:51:09 ajacoutot Exp $
$OpenBSD: README,v 1.3 2010/12/20 11:40:39 ajacoutot Exp $
Using sane(7) under OpenBSD
===========================
First read ${TRUEPREFIX}/share/doc/sane-backends/PROBLEMS.
Make sure your user has read/write access to the scanner device
(e.g. /dev/uscanner0) or you will not be able to scan.
USB
---
Since USB scanning will be handled by libusb, you need to allow the
_cups user rw access to the corresponding USB endpoint. To do so, find
where your scanner is attached to using dmesg(8) then change the
ownerships accordingly.
ugenX = /dev/ugenX
uhubX = /dev/usbX
* USB
With some USB backends, the OpenBSD uscanner(4) driver does not support
getting USB vendor and product ids. To make your scanner work with sane,
you'll have to disable uscanner(4) in your kernel - see config(8) -
which will allow libusb to claim your device instead. When using libusb,
you need read/write permissions to ugen(4) (/dev/ugen*.*) and the usb(4)
controller (/dev/usb*) your scanner is connected to (consider using
hotplugd(8) attach and detach scripts).
e.g.
$ dmesg | grep ugen
ugen0 at uhub1 port 1 "EPSON USB MFP" rev 1.10/1.00 addr 2
$ sudo chgrp _saned /dev/ugen0.* /dev/usb1
* SCSI
The reason we are changing the group and not the user is that it will
allow for multi-function devices to work for both printing and scanning
(e.g. by being owned by _cups:_saned).
To preserve your changes after a system update, use rc.local(8).
e.g. for a multi-function printer/scanner add the following lines:
chown _cups:_saned /dev/ugen0.* /dev/usb1
You can then grant users direct access to the scanner by adding them to
the _saned group.
SCSI
----
SANE only supports the generic SCSI uk(4) devices.
Make sure your user has read/write access to the scanner device or you
will not be able to scan.
* LOCKING
LOCKING
-------
Some backends (like sane-plustek(5)) use a lockfile for allowing
multiple access to one scanner. If using such a backend, you must
add yourself to the _saned group or you will not be able to scan.
* NETWORK
NETWORK
-------
The saned(8) daemon needs rw access to your device, make sure the _saned
group as rw permissions.
If you're planning on using the SANE network daemon (saned) with
inetd(8) as opposed to starting it standalone from the provided rc
script, add the following line in /etc/services:

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $OpenBSD: saned.rc,v 1.4 2010/12/11 12:57:37 ajacoutot Exp $
# $OpenBSD: saned.rc,v 1.5 2010/12/20 11:40:39 ajacoutot Exp $
. /etc/rc.d/rc.subr
@ -8,12 +8,4 @@ daemon="${TRUEPREFIX}/libexec/saned"
daemon_flags="-a _saned"
rc_reload=NO
rc_pre() {
[ -e /dev/uscanner0 ] && chgrp _saned /dev/uscanner0
}
rc_post() {
[ -e /dev/uscanner0 ] && chgrp wheel /dev/uscanner0
}
rc_cmd $1