*BSD News Article 69477


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!zombie.ncsc.mil!news.mathworks.com!newsfeed.internetmci.com!in1.uu.net!n3ott.istar!ott.istar!istar.net!n1van.istar!van.istar!van-bc!unixg.ubc.ca!news.bc.net!news.sfu.ca!freud.psyc.sfu.ca!blackw
From: blackw@sfu.ca (Richard Blackwell)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: printcap problem - lpd ignoring settings(?)
Date: Sun, 26 May 1996 15:51:49 UNDEFINED
Organization: Simon Fraser University
Lines: 48
Distribution: world
Message-ID: <blackw.9.00462A9F@sfu.ca>
NNTP-Posting-Host: freud.psyc.sfu.ca
Keywords: unix printcap
X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #1]

This is quite possibly a newbie question...

I'm running FreeBSD-2.1.0-RELEASE on a P75 w/16M RAM.  I have attached a 
dot-matrix printer to lpt0.  The problem I am having is that the lpd seems to 
be ignoring the "suppress header" and "text filter" options in my 
/etc/printcap.  Here's the file:

#	@(#)printcap	5.3 (Berkeley) 6/30/90
#
#	Last modified 05/24/96 - RDB
lp|line printer:\
	:sh:\
	:lp=/dev/lpt0:\
	:if=/usr/local/libexec/testif:\
	:sd=/var/spool/lpd/lp:\
	:lo=/var/spool/lpd/lp/lock:\
	:lf=/var/log/lpd-errs:


The text filter (/usr/local/libexec/testif) is as follows:

#!/bin/sh
(/bin/echo "*** TEXT FILTER HEADER ***" && /bin/cat) && exit 0
exit 2


When I issue the command:

lpr /etc/printcap

I get a copy of the printcap file WITH a burst page, and WITHOUT the text 
filter header.

However, if I issue the command:

cat /etc/printcap | /usr/local/libexec/testif

I get the printcap file immediately following "*** TEXT FILTER HEADER ***".

Any suggestion as to what may be causing lpd to ignore the settings would be 
appreciated.  TIA.

Richard Blackwell
Department of Psychology
Simon Fraser University
blackw@sfu.ca