Subject: Re: lpd and filter programs
To: Matthias Scheler <tron@lyssa.owl.de>
From: Simon Burge <simonb@telstra.com.au>
List: tech-userlevel
Date: 07/21/1998 09:33:23
On 20 Jul 1998 23:07:15 GMT  Matthias Scheler wrote:

> In article <199807202005.QAA22004@trooper.velocet.ca>,
> 	David Gilbert <dgilbert@velocet.ca> writes:
> > I've always found this a rather kludgy way of doing things.
> 
> Me too. Would anyone object if I fix our "lpd"?

Have fun!  I looked at this once before (for work), and decided it
wasn't worth the effort.  You need to combine the functionality of
sendit() and printit() in lpd/printjob.c.  We ended up working around it
by introducing the concept of "bounce queues".  As described by others
(ie, the kludgy way), each filter lpr'd into the next queue, and lpq was
modified to look in successive queues listed in the "bq" printcap field.
This is sorta what we have:

	a4lj5si_plo|melb_a4lj5si_plo|LJ5si A4 laser:\
		:lp=:\
		:mx#0:\
		:rm=printhost:\
		:rp=a4lj5si_plo:\
		:sd=/var/spool/lpd/a4lj5si_plo:\
		:sh:\
		:bq=lj5si.a4:
	lj5si.a4|melb_lj5si.a4|lj5si|melb_lj5si|HP LaserJet 5si:\
		:lp=:\
		:mx#0:\
		:rm=printhost:\
		:rp=lj5si.a4:\
		:sd=/var/spool/lpd/lj5si.a4:\
		:sh:\
		:bq=lj5si.raw:
	lj5si.raw|melb_lj5si.raw|HP LaserJet 5si:\
		:lp=:\
		:mx#0:\
		:rm=printhost:\
		:rp=lj5si.raw:\
		:sd=/var/spool/lpd/lj5si.raw:\
		:sh:

And an lpq would show:

	melb100:~ 2> lpq -Pa4lj5si_plo
	>> queue a4lj5si_plo
	no entries
	>> bounce queue lj5si.a4
	no entries
	>> bounce queue lj5si.raw
	no entries

If you were to do this "The Proper Way(tm)", we'll happily use the new
improved mechanism!

Simon.