From owner-freebsd-questions Wed Apr 17 9:13:17 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.simrad.no (mail.simrad.no [193.69.73.2]) by hub.freebsd.org (Postfix) with ESMTP id A27DA37B420 for ; Wed, 17 Apr 2002 09:13:09 -0700 (PDT) To: freebsd-questions@freebsd.org Subject: if-simple filter won't work with printer MIME-Version: 1.0 X-Mailer: Lotus Notes Build M11_11052001 Beta 4 November 05, 2001 Message-ID: From: chip.wiegand@simrad.com Date: Wed, 17 Apr 2002 09:13:21 -0700 X-MIMETrack: Serialize by Router on S_INET01/S_EXT(Release 5.0.6a |January 17, 2001) at 17.04.2002 18:13:27, Serialize complete at 17.04.2002 18:13:27 Content-Type: text/plain; charset="US-ASCII" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I am setting up a HP952C on my FreeBSD-4.5r box on lpt0 and have printed to #lptest > /dev/lpt0 When I try to print #lptest 20 5 | lpr -Php I get the following error - Apr 17 07:57:42 cwiegand2 lpd[90655]: cannot execv /usr/local/libexec/if-simple Apr 17 07:57:42 cwiegand2 lpd[90654]: hp: job could not be printed (cfA000cwiegand2) The file if-simple is directly from the handbook #!/bin/sh # if-simple - Simple text input filter for lpd # Installed in /usr/local/libexec/if-simple # Simply copies stdin to stdout. Ignores all filter arguments. /bin/cat && exit 0 exit 2 with permissions set chmod 555 I also did chmod +x to see if that would make any differance, but it doesn't. /etc/hosts.lpd has the ip address as well as the computer name of the machines that will be printing to this printer, but right now the print server itself is printing, so the others will have to wait. According to the error the problem is with the if-simple filter, which is direct from the handbook. I noticed that even without a lf statement in the printcap that the lpd-err is still written to, while the handbook says that the messages would be sent to stdout. I added the line lf=/var/log/lp.log and created the file lp.log, yet it does not write to hp.log, it writes to lpd.errs. Is this something that should be corrected in the handbook? Here is my printcap file - hp|lp|952C|HP952C:\ :sh:sd=/var/spool/lpd/hp:\ :lp=/dev/lpt0:\ :if=/usr/local/libexec/if-simple:\ :lf=/var/log/hp.log Oh yeah, I also noticed in the manual a section about certain HP printers not working correctly in interrupt mode, so I ran #lptcontrol -p -d /dev/lpt0 But it has made no differance. When I run #lpc restart all I get this response - hp: no daemon to abort hp: daemon started every time I do lpc restart all. Does this indicate the daemon is not working at all? Running #ps -aux | grep hp does not show any such process. Hopefully this is enough information to troubleshoot this problem. If not, I'll provide whatever else I can. -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com chip.wiegand@simrad.com "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why do I have 9? Somebody help me!) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message