File netatalk.papd.stderr.patch of Package netatalk

---------------------
PatchSet 2544 
Date: 2008/08/07 09:51:14
Author: didg
Branch: branch-netatalk-2-0
Tag: (none) 
Log:
papd -d doesn't write to stderr. From Martin Nagy

Members: 
	etc/papd/main.c:1.18.6.2.2.2->1.18.6.2.2.3 

---
 etc/papd/main.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/etc/papd/main.c
+++ b/etc/papd/main.c
@@ -260,7 +260,7 @@ int main( ac, av )
 
     switch (server_lock("papd", pidfile, debug)) {
     case 0: /* open a couple things again in the child */
-      if ((c = open("/", O_RDONLY)) >= 0) {
+      if (!debug && (c = open("/", O_RDONLY)) >= 0) {
 	dup2(c, 1);
 	dup2(c, 2);
       }
@@ -287,7 +287,8 @@ int main( ac, av )
     openlog( p, LOG_PID );
 #else /* ultrix */
     set_processname(p);
-    syslog_setup(log_debug, logtype_default, logoption_ndelay|logoption_pid, logfacility_lpr );
+    syslog_setup(log_debug, logtype_default, logoption_ndelay | logoption_pid |
+               debug ? logoption_perror : 0, logfacility_lpr );
 #endif /* ultrix */
 
     LOG(log_info, logtype_papd, "restart (%s)", version );