[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BusyBox] CONFIG_FEATURE_UDHCP_SYSLOG & stdout
From:       Doug Kehn <rdkehn () yahoo ! com>
Date:       2004-11-23 13:36:30
Message-ID: 20041123133630.70834.qmail () web51909 ! mail ! yahoo ! com
[Download RAW message or body]

udhcp: 0.9.9-pre
busybox: 1.0.0

When CONFIG_FEATURE_UDHCP_SYSLOG = y, udhcpc still
sends output to stdout.  In looking at udhcp_logging
(networking/udhcp/common.c) logging to stdout will
only be bypassed if udhcpc is daemonized.  I'm
starting udhcpc from inittab

::respawn:/sbin/udhcpc -f -i ixp1 -s /etc/udhcpc.ixp1

so udhcpc will not be daemonized.  This results in all
messages being logged to stdout.  If syslogd is
disabled, the message is sent to stdout twice.

If CONFIG_FEATURE_UDHCP_SYSLOG is enabled does it make
sense to still log to stdout (daemonized or not)?  If
syslogd is enabled, the message is (obviously) sent to
syslog.  However, if syslogd is disabled, the message
is sent to stdout.

Is there another way to prevent logging to stdout when
CONFIG_FEATURE_UDHCP_SYSLOG is enabled?

If it does not make sense to log to stdout when
CONFIG_FEATURE_UDHCP_SYSLOG is enabled, the patch
below will correct the condition.

Thanks,
...doug

--- busybox/networking/udhcp/common.c.orig	2004-11-23
07:42:37.000000000 -0500
+++ busybox/networking/udhcp/common.c	2004-11-23
07:43:14.000000000 -0500
@@ -86,10 +86,6 @@
 
 	va_start(p, fmt);
 	__va_copy(p2, p);
-	if(!daemonized) {
-		vprintf(fmt, p);
-		putchar('\n');
-	}
 	vsyslog(level, fmt, p2);
 	va_end(p);
 }


		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 



_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic