Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!styx!ames!ucbcad!ucbvax!sdcsvax!ucsdhub!hp-sdd!artecon!tony From: tony@artecon.UUCP Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Filters for the BSD print spooling system Message-ID: <400@artecon.artecon.UUCP> Date: Tue, 31-Mar-87 11:16:03 EST Article-I.D.: artecon.400 Posted: Tue Mar 31 11:16:03 1987 Date-Received: Fri, 3-Apr-87 06:37:09 EST References: <111@coke.UUCP> Reply-To: tony@artecon.UUCP (Anthony D. Parkhurst) Organization: artecon Lines: 87 Keywords: sun bsd print spooler printer filter Xref: utgpu comp.unix.questions:1576 comp.unix.wizards:1618 In article <111@coke.UUCP> robert@coke.UUCP (Robert Claeson) writes: >I'm not really sure whether this should go to comp.unix.questions >or comp.unix.wizards, so I send it to both. When in doubt, send it to comp.unix.questions. IF no response, (or responses that say it's a wizard question), then post it to the wizards group. (At least this is the rule I remember). >installed it as if (input(?) filter) and of (output filter), only I haven't used 'if' before, but my manual says it is for accounting? I suppose 'input' could be derived. >lpd expects the output filter (the one which prints the banner page) You can get the banner without an output filter. Anyways here are a few things to consider: 1) Always use absolute path names. When lpd is spawned by rc at boot time, it on many systems has an empty environment (ie. no PATH) 2) Make sure that the error logging file exists. If your error file is /usr/adm/lpd-errs (or whatever), that file has to exist, or the errors will not be logged. This can be a big help, it will freqently tell you what the problem is. However, when you are done with it remove it because it can grow quickly while not being monitored. 3) (wait, there is no 3) Here are a few points from one of my manuals: RE: fields in printcap: if: Output filter that can do accounting of: Output filter, if 'if' is specified, 'of' is only used for the banner page. tf,cf,vf: other output filters. lf: error logging file (The point here is that not all filters are used on each job) You don't NEED an 'if' AND an 'of'. The tf,cf,and vf are used if certain flags are passed. I don't see the use of using BOTH 'if' and 'of' when they are the SAME filter (as you specified above). On filters themselfs: Filters are spawned by lpd with stdin the data, stdout the printer and stderr the file specified by 'lf'. Filters should return '0' exit code for success, '1' if job should be reprinted, and '2' if job should be thrown away. SIGINT is sent to all the processes when lprm is issued to remove a job. Arguments passed to filters: of filter: ofilter -wwidth -llength (see 'pw' and 'pl' in printcap) (I wonder how 'of' can print the banner w/o names) if filter: ifilter [-c] -wwidth -llength -iindent -n login -h host accounting_file -c is present when -l is used on the lpr command. All other filters: filter -xwidth -ylength -n login -h host accounting_file (see 'px' and 'py' in printcap) Hope this helps -- **************** Insert 'Standard' Disclaimer here: OOP ACK! ***************** * Tony Parkhurst -- {hplabs|sdcsvax|ncr-sd|hpfcla|ihnp4}!hp-sdd!artecon!adp * * -OR- hp-sdd!artecon!adp@nosc.ARPA * *******************************************************************************