# Re: /proc/scsi/scsi

Sean Reifschneider (jafo@tummy.com)
Sat, 18 Apr 1998 13:48:51 -0600

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Dave Restall - System Administrator: "Scanace II Technical Details"
- Previous message: Kevin Dalley: "Custom gamma table causes undesired distortions in Astra 1200S"
- In reply to: Oliver.Rauch@Wolfsburg.DE: "Re: /proc/scsi/scsi"

I have given this quite a bit of thought over the years. When we first
started selling XVScan for Linux, we were getting quite a high percentage
of support calls that were basically just scanner setup problems...
Once I got a fairly robust install script created, they have essentially
dropped off to zero.

The problem is more general than just scanners though. It affects other
devices as well (such as CD-ROM writers, etc...). In XVScan, the install
"helper" program is designed such that it can be run at every boot from
the rc scripts in case the scanner has moved.

But what you really want is a program that will walk through the
connected SCSI devices and takes action based on a configuration
file, something like the following:

VENDOR="HP" MODEL="*" TYPE=3 CREATE=/dev/scanjet? PERMS=660:root:floppy
VENDOR="*" MODEL="*" TYPE=6 CREATE=/dev/scanner? PERMS=660:root:floppy
VENDOR="YAMAHA" MODEL="*" TYPE=<cd-writer-type> CREATE=/dev/cdwriter?
PERMS=660:root:floppy

Using regular expressions is of course useful. The CREATE directive would
specify what device file names to create ("filename?" tells the program to
create "filename0" for the first found instance, "filename1" for the second,
etc...). This would also allow you to specify the permissions and owners.

The problem with just linking "/dev/scanner" to "/dev/sgX" is that the sg
device files RARELY have the proper permissions for scanning as a user.

Scanner detection can be a problem though. Linux isn't so hard, but
try looking for a scanner on the second bus of an HP workstation...

Sean

    --
     "If all you have is a hammer, every problem tends to look like a nail."
    Sean Reifschneider, Inimitably Superfluous <jafo@tummy.com>
    URL: <http://www.tummy.com/xvscan> HP-UX/Linux/FreeBSD/BSDOS scanning software.

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

     Next message: Dave Restall - System Administrator: "Scanace II Technical Details"
     Previous message: Kevin Dalley: "Custom gamma table causes undesired distortions in Astra 1200S"
     In reply to: Oliver.Rauch@Wolfsburg.DE: "Re: /proc/scsi/scsi"