Subject: problems with papd

From: Moritz Kaiser <[email-masked]>
Date: Sat, 6 May 2000 15:51:45 +0200 (CEST)

Hi,

I've got a serious problem with using papd for printing documents from a
G4 PowerMac on a Debian Linux machine.
papd refuses to start at boot time and at any time later.
typing "/etc/init.d/netatalk start" causes the following output:
*snip*
Starting AppleTalk daemons (this will take a while): atalkd afpdBad
termcap entry
Bad papcap entry
 papd.
*snip*
After all papd is not running. Does anyone know what i made wrong?
The entry in my /etc/netatalk/papd.conf follows:
*snip*
#
#
kyocera:\
	:pr=lp2:op=lp:\
	:pd=/usr/lib/ppd/KC170PEG.PPD:
#
#
*snip*

greetings,
Moritz

__________________________________________________________
Moritz Kaiser
Studentische Vertretung, Technische Universitaet Muenchen
Europe / Germany

---

From: Dejan Muhamedagic <[email-masked]>
Date: Sun, 7 May 2000 12:04:46 +0200

Hello,

> Starting AppleTalk daemons (this will take a while): atalkd afpdBad

You should check both papd.conf and /etc/printcap.

> 	:pd=/usr/lib/ppd/KC170PEG.PPD:

This one looks fine syntactically.  Still it's better if you use

  	:pr=|/usr/bin/lpr -Plp2:op=lp:\

and prevent papd from messing up the spool directory.

Hope that this helps.

Dejan

---

From: Dejan Muhamedagic <[email-masked]>
Date: Mon, 8 May 2000 01:57:53 +0200

>       :pd=/usr/lib/ppd/KC170PEG.PPD:

For some reason papd doesn't like your papd.conf.  Are you sure that
there are no spaces after \ (i.e. at the end of the line)?  If you've
verified everything, try applying this patch to the source code.  Then
do "make clean; make; make install", start the atalk rc script and watch
the logs in /var/log.  The patch is against 2.1.4-37b, but it seems that
the code in question didn't change for years so it should work for
older/newer versions as well.

Dejan
--- etc/papd/printcap.c.orig	Fri May 30 02:27:35 1997
+++ etc/papd/printcap.c	Mon May  8 01:50:04 2000
@@ -43,6 +43,7 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
+#include <sys/syslog.h>
 #include <atalk/paths.h>
 
 #ifndef BUFSIZ
@@ -250,6 +251,7 @@
 	while (*--p != ':')
 		if (p<tbuf) {
 			write(2, "Bad termcap entry\n", 18);
+			syslog(LOG_ERR, "error in <%s>", tbuf );
 			return (0);
 		}
 	p++;