[comp.protocols.appletalk] Sorry...I messed up

jfk@eniac.seas.upenn.edu (James F. Kennedy) (08/16/90)

I accidently sent this message without my reply... Here's the full response.

Subject: Re: Setting up multiple LW with CAP
References: <26C98B2F.9130@orion.oac.uci.edu>
Reply-To: jfk@eniac.seas.upenn.edu (James F. Kennedy)
Organization: University of Pennsylvania

In article <26C98B2F.9130@orion.oac.uci.edu> meggers@mothra.nts.uci.edu (Mark Eggers) writes:
>I am having trouble spooling to two different LaserWriters in the same zone.
>
>my /etc/printcap file is:
>
>lp|LaserWriter|NTS LaserWriter II NT:\
>     :lp=/dev/null0:\
>     :sd=/var/spool/lpd:\
>     :pl#72:pw#86:\
>     :lf=/var/adm/lpd-errs:\
>     :if=/usr/local/cap/pspr:\
>     :of=/usr/local/cap/papof:
>#
>lp2|LaserWriter2|NeST LaserWriter II NT:\
>     :lp=/dev/null1:\
>     :sd=/var/spool/lpd2:\
>     :pl#72:pw#86:\
>     :lf=/var/adm/lpd-errs2:\
>     :if=/usr/local/cap/pspr:\
>     :of=/usr/local/cap/papof:
>
>and my /etc/cap.printers file is:
>
>lp=NTS LaserWriter II NT :LaserWriter@NTS-LocalTalk
>lp2=NeST LaserWriter II NT :LaserWriter@NTS-LocalTalk
>
>lpc>status shows both daemons active and printing, however output only
>goes to the first LaserWriter.
>
>Thoughts - I'm stumped.
>
>thanks for the help - /mde/

Your problem is that the Berkeley lpd doesn't pass the name of the printer to 
your if filter ( in this case pspr) by default.  I am assuming that pspr is 
some version of the generic papif.  One way to remedy this is to create 
symbolic links to papif using the printer's name as the link (this is
suggested in the CAP distribution notes).

For example, we have two laserwriters (lw1 and lw2)-- the printcap if
definitions look like this:

	lw1|ps1|postscript1|lw|ps|postscript|LaserWritera IINTX in 157:\
 		:if=/usr/local/lib/cap/lw1:\

	lw2|ps2|postscript2|LaserWriterb IINTX in 157:\
 		:if=/usr/local/lib/cap/lw2:\

lw1 and lw2 are symbolic links to papif (using ln -s command).

Another way to do this would be to write a script, and have if pointing
to that.  This gives you more flexibilty when utilizing configuration
variables for papif.  It could be something like this:

#!/bin/sh
exec /my/dir/papif -P lw1 $*

#!/bin/sh
exec /my/dir/papif -P lw2 $*

where lw1 is your first laserwriter and lw2 is the second one.

Hope this helps....


				James
--
James F. Kennedy			Internet: jfk@moore.seas.upenn.edu
University of Pennsylvania			  jfk@eniac.seas.upenn.edu
CETS Macintosh Coordinator		AT&TNet:  (215)898-9346