[vox-tech] Slack 10 print problem solved

Shwaine shwaine at shwaine.com
Wed Dec 1 10:42:50 PST 2004


On Tue, 30 Nov 2004, Bill Wells wrote:
> On Monday 29 November 2004 11:32 am, Shwaine wrote:
>> #### Parallel printer support ###
>> if cat /proc/ksyms | grep "\[lp\]" 1> /dev/null 2> /dev/null ; then
>>    echo "lp support built-in, not loading module" > /dev/null
>> else
>>    if [ -r /lib/modules/$RELEASE/misc/lp.o \
>>         -o -r /lib/modules/$RELEASE/misc/lp.o.gz \
>>         -o -r /lib/modules/$RELEASE/kernel/drivers/char/lp.o \
>>         -o -r /lib/modules/$RELEASE/kernel/drivers/char/lp.o.gz ]; then
>>      /sbin/modprobe lp
>>    fi
>> fi
>>
>> Note the line /sbin/modprobe lp. If it is not working on your system,
>> then the if statement to fine the module is failing for some reason.
>> RELEASE is set to uname -r. I am still using the default kernel and
>> kernel modules that came with Slackware and it works fine. The module is
>> found in /lib/modules/2.4.26/kernel/drivers/char/lp.o.gz.

> I am running the 2.6.7 kernel

Well, that answers the questions. I have one box with the 2.6.7 kernel, 
using the kernel modules package including on disk 2 of the Slackware 10.0 
set. Assuming that is what you have, the problem is with the if statement 
in /etc/rc.d/rc.modules. The filename for the module is lp.ko, not lp.o. 
You need to modify it to thusly to keep compatability with the 2.4.x 
kernel series:

#### Parallel printer support ###
if cat /proc/ksyms | grep "\[lp\]" 1> /dev/null 2> /dev/null ; then
    echo "lp support built-in, not loading module" > /dev/null
else
    if [ -r /lib/modules/$RELEASE/misc/lp.o \
         -o -r /lib/modules/$RELEASE/misc/lp.o.gz \
         -o -r /lib/modules/$RELEASE/kernel/drivers/char/lp.o \
         -o -r /lib/modules/$RELEASE/kernel/drivers/char/lp.o.gz \
         -o -r /lib/modules/$RELEASE/kernel/drivers/char/lp.ko \
         -o -r /lib/modules/$RELEASE/kernel/drivers/char/lp.ko.gz]; then
      /sbin/modprobe lp
    fi
fi

Actually, I'm not even sure if the lp.ko.gz line is required. I haven't 
much kept up on the ins and outs of modules in the 2.6 series. But 
definately the lp.ko line will be needed or the if statement will fail and 
it won't even try to modprobe lp.


More information about the vox-tech mailing list