meggers@mothra.nts.uci.edu (Mark Eggers) (08/16/90)
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/
farrell@PANGEA.STANFORD.EDU (Phil Farrell) (08/16/90)
Mark Eggers requests help setting up /etc/printcap to print to two different LaserWriters in the same AppleTalk zone using CAP. Mark, your printcap looks fine to me except for one thing: both entries reference the "if" filter as /usr/local/cap/pspr. I assume this is another name for the "papif" filter supplied in CAP. Now, the Berkeley lpd daemon does not pass the printer queue name to this filter by default, so how does "pspr" distinguish which printer to contact? The mechanisms suggested in the CAP documentation are to either create hard or symbolic links to the papif filter with the names of the different printer queues (in your case, lp and lp2), and then use those links as the "if" filter entries, respectively; or to create small shell scripts, one per queue, that call papif with the printer name argument plus the arguments passed by lpd. For example, there could be a shell script /usr/local/cap/lp with lines: #! /bin/sh exec /usr/local/cap/papif -P lp $* This would be the "if" filter for queue "lp". Similarly, the script /usr/local/cap/lp2, which is the "if" filter for queue "lp2", would have #! /bin/sh exec /usr/local/cap/papif -P lp2 $* I like the shell script approach, because it also allows me to customize each queue via the configuration environment variables described in papif(8) (things like where to put banner pages, whether to allow page reversal, etc). -Phil Farrell, Computer Systems Manager Stanford University School of Earth Sciences farrell@pangea.stanford.edu