plustek@linuxhacker.org

plustek@linuxhacker.org


Subject: Re: Plustek 9636T Problems
From: kevin
Date: Thu, 28 Jun 2001 14:42:11 -0400

"John C. Hollemans" wrote:
> 
> _____
> Thanks very much for your feedback.  I remember reading something along
> those lines.  Will try loading parport etc. by hand first, followed by
> doing depmod on the pt_drv driver.  Could you possibly share your script
> ??  No doubt it is only a couple of lines.
> 
> / John
> 

Here is the script. It is executed by typing "scanner" at a
console. As memtioned, it will load the driver if it is not
loaded, or unload it if it already is loaded. Since the pt_drv.o
module needs to be installed at root, I use the sudo package to
intall it as a regular user (e.g. " sudo scanner" after sudo has
been updated to allow that user to run the script):

<<<<<<<<<<<<<<<<  start of script scanner >>>>>>>>>>>>>>>>>>>>>


#!/bin/sh -

scandrv=$(/sbin/lsmod | /bin/grep pt_drv)
if [ "$scandrv" = "" ]
then
    /sbin/modprobe parport
    rmmod lp
    /sbin/modprobe pt_drv
    scandrv=$(/sbin/lsmod | /bin/grep pt_drv)
    echo ""
    if [ "$scandrv" = "" ]
    then
        echo "Plustek scanner driver is not installed."
    else
        echo "Plustek scanner driver is installed."
    fi   
    echo ""
else
    /sbin/modprobe -r pt_drv
    scandrv=$(/sbin/lsmod | /bin/grep pt_drv)
    echo ""
    if [ "$scandrv" = "" ]
    then
        echo "Plustek scanner driver is not installed."
    else
        echo "Plustek scanner driver is still installed."
    fi   
    echo ""
fi


<<<<<<<<<<< end of scanner >>>>>>>>>>>>>>>>>>>>>>>>

you should be able to copy and past the lines between the <<<   
>>> s (they are not part of the script).


plustek@linuxhacker.org