LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 10, CUPS, HP Officejet 600 (https://www.linuxquestions.org/questions/slackware-14/slackware-10-cups-hp-officejet-600-a-231821/)

fader 09-17-2004 11:39 AM

Slackware 10, CUPS, HP Officejet 600
 
Hi guys including all the Slackware Gurus out there!

I've had an HP Officejet 600 for quite a while running on XP Pro, but I always was hesitant to get it to work in Slackware. On the Stealth Desktop Part III I just read this morning, I here the generic kernel doesn't come with the loadable modules for Parallel Printer Support. My Officejet is a parallel printer so that means I'll have to install the module into /lib/modules. But that's no biggie.

The hard part is ptal-init and CUPS in Slackware. A while ago, I tried to install the printer in Slackware 9.1 but I couldn't get it to work, so I gave up on that. Now, I actually have a need for a Printer in Linux.

Here's the problem (once I have Parallel Printer all working and stuff):

1.) I ./configure, make, make install hpijs. This part is just fine. This isn't hard to do.
2.) Secondly, I have to install hpoj fine source, which builds just fine, EXCEPT for the SystemV init deal. I'm not too familiar of how Slackware deals with SystemV init scripts.
3.) I probe the printer and ptal-init recognizes it and everything is just fine. The hard part is to get the ptal-init to start before CUPS at Startup and end after CUPS at reboot or shutdown.

I've installed a PSC 2210 on a Xandros and Xandros uses SystemV scripts, but Slackware doesn't.

At installation, I checked that rc.cups should startup at boot time, which it does, but I'm not that familiar with the BSD-style init scripts Slackware used. This includes the stuff in /etc, which are namely rc.S, rc.M, rc.6 .... rc.cups, rc.sysvinit (whatever it is). Is there any way make cups start as a system V script along with ptal-init. Someone just gimme that lowdown from the beginning. Thanks!

gbonvehi 09-17-2004 12:07 PM

You don't have to install the modules, just uncommend the line to load them (modprobe parport_pc and modprobe lp) in /etc/rc.d/rc.modules. You have packages for cups and gimp-print (the two you need to print) in default slackware cds if you made a full install, or you can get them in any slackware mirror.

Nikon01 09-17-2004 12:29 PM

Well at least people are reading my posts :cool:

fader 09-17-2004 01:26 PM

Getting Parallel To Work Isn't Really A Problem, but thanks for that anyway. The root of the problem is getting ptal-init to start before CUPS somehow in the System Init Scripts. Is it safe for me to delete rc.cups and add a link to cupsd somewhere else preferably in rc.sysvinit in the rc.S, rc.6 files etc.?

carboncopy 09-17-2004 09:09 PM

What I would do is:
Code:

mkdir /etc/rc.d/delay
mv /etc/rc.d/rc.cups /etc/rc.d/delay
emacs rc.local
(add this line) /etc/rc.d/delay/rc.cups


r_jensen11 09-17-2004 10:33 PM

Quote:

Originally posted by fader
Getting Parallel To Work Isn't Really A Problem, but thanks for that anyway. The root of the problem is getting ptal-init to start before CUPS somehow in the System Init Scripts. Is it safe for me to delete rc.cups and add a link to cupsd somewhere else preferably in rc.sysvinit in the rc.S, rc.6 files etc.?
Wouldn't do that. What you could do is a bunch of different options:

1: insert lines into rc.cups that load ptal-init

2: (what I did) create a script called rc.ptal (just an example, what mine is named) and have that script run before rc.cups (put in the code to have it executed in rc.M I believe it is)

here's an excerpt from my rc.M file:
Code:

# Start ptal
if [ -x /etc/rc.d/rc.ptal ]; then
  echo "Starting ptal-init (ptal-init start)"
  . /etc/rc.d/rc.ptal start
fi

# Start the print spooling system.  This will usually be LPRng (lpd) or CUPS.
if [ -x /etc/rc.d/rc.cups ]; then
  # Start CUPS:
  /etc/rc.d/rc.cups start
elif [ -x /etc/rc.d/rc.lprng ]; then
  # Start LPRng (lpd):
  . /etc/rc.d/rc.lprng start
fi

and here is my /etc/rc.d/rc.ptal:
Code:

rob@4300:~$ cat /etc/rc.d/rc.ptal
#!/bin/sh
#
# /etc/rc.d/rc.httpd
#
# Start/stop/restart the Apache web server.
#
# To make Apache start automatically at boot, make this
# file executable:  chmod 755 /etc/rc.d/rc.httpd
#

case "$1" in
  'start')
      /usr/local/sbin/ptal-init start ;;
  'stop')
      /usr/local/sbin/ptal-init stop ;;
  'restart')
      /usr/local/sbin/ptal-init restart ;;
  *)
      echo "usage $0 start|stop|restart" ;;
esac

chmod rc.ptal to 755 and you shouldn't have any problems. My only grief is that I have to have the printer turned on before the scripts run (not sure if it's ptal, cups, or hotplug, I restart all of them if I forget to turn the printer on, just in case). It might just be a 2.6.8.1 glitch though, I'm finding several glitches with my kernel.

eelriver 09-17-2004 11:25 PM

The newer rc.M scripts already have a hpoj script in them.
Code:

#Initialize HP Officejet support
if [-x /etc/rc.d/rc.hpoj ]; then
/etc/rc.d/rc.hpoj start

However, this is in the wrong order in the script and needs to be moved to start before cups.
This is my rc.hpoj script:
Code:

#!/bin/sh
#
#
# Startup for HP printer and scanner drivers
/usr/local/sbin/ptal-init start


fader 09-18-2004 08:22 AM

Okay, so it's been cleare that startup scripts are fine, but what about the kill scripts? Do I even have to deal with rc.sysvinit? Do I have to kill CUPS in rc.6 before ptal as well? Thanks All.


All times are GMT -5. The time now is 09:44 AM.