svn commit: trunk/busybox: init libbb loginutils miscutils network etc...

vda at busybox.net vda at busybox.net
Thu Sep 7 06:02:41 UTC 2006


Author: vda
Date: 2006-09-06 23:02:39 -0700 (Wed, 06 Sep 2006)
New Revision: 16063

Log:
Add CONFIG_FEATURE_SYSLOG which controls whether
bb_xx_msg will ever try to send output to syslog.
Add "select CONFIG_FEATURE_SYSLOG" to relevant applets.
This allows to omit syslog code if we do not have
any syslog-capable applets in the build.



Modified:
   trunk/busybox/Config.in
   trunk/busybox/init/Config.in
   trunk/busybox/libbb/verror_msg.c
   trunk/busybox/libbb/vinfo_msg.c
   trunk/busybox/loginutils/Config.in
   trunk/busybox/miscutils/Config.in
   trunk/busybox/networking/Config.in
   trunk/busybox/networking/udhcp/Config.in
   trunk/busybox/sysklogd/Config.in


Changeset:
Modified: trunk/busybox/Config.in
===================================================================
--- trunk/busybox/Config.in	2006-09-07 05:43:38 UTC (rev 16062)
+++ trunk/busybox/Config.in	2006-09-07 06:02:39 UTC (rev 16063)
@@ -150,6 +150,13 @@
 	  are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs,
 	  and vlock.
 
+config CONFIG_FEATURE_SYSLOG
+	bool "Support for syslog"
+	default n
+	help
+	  This option is auto-selected when you select any applet which may
+	  send its output to syslog. You do not need to select it manually.
+
 config CONFIG_FEATURE_SUID_CONFIG
 	bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
 	default n if CONFIG_FEATURE_SUID

Modified: trunk/busybox/init/Config.in
===================================================================
--- trunk/busybox/init/Config.in	2006-09-07 05:43:38 UTC (rev 16062)
+++ trunk/busybox/init/Config.in	2006-09-07 06:02:39 UTC (rev 16063)
@@ -8,6 +8,7 @@
 config CONFIG_INIT
 	bool "init"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  init is the first program run when the system boots.
 

Modified: trunk/busybox/libbb/verror_msg.c
===================================================================
--- trunk/busybox/libbb/verror_msg.c	2006-09-07 05:43:38 UTC (rev 16062)
+++ trunk/busybox/libbb/verror_msg.c	2006-09-07 06:02:39 UTC (rev 16063)
@@ -32,7 +32,7 @@
 		else
 			fprintf(stderr, ": %s\n", strerr);
 	}
-	if (logmode & LOGMODE_SYSLOG) {
+	if (ENABLE_FEATURE_SYSLOG & (logmode & LOGMODE_SYSLOG)) {
 		if (!strerr)
 			vsyslog(LOG_ERR, s, p2);
 		else  {

Modified: trunk/busybox/libbb/vinfo_msg.c
===================================================================
--- trunk/busybox/libbb/vinfo_msg.c	2006-09-07 05:43:38 UTC (rev 16062)
+++ trunk/busybox/libbb/vinfo_msg.c	2006-09-07 06:02:39 UTC (rev 16063)
@@ -24,7 +24,7 @@
 		vprintf(s, p);
 		putchar('\n');
 	}
-	if (logmode & LOGMODE_SYSLOG)
+	if (ENABLE_FEATURE_SYSLOG & (logmode & LOGMODE_SYSLOG))
 		vsyslog(LOG_INFO, s, p2);
 	va_end(p2);
 }

Modified: trunk/busybox/loginutils/Config.in
===================================================================
--- trunk/busybox/loginutils/Config.in	2006-09-07 05:43:38 UTC (rev 16062)
+++ trunk/busybox/loginutils/Config.in	2006-09-07 06:02:39 UTC (rev 16063)
@@ -80,6 +80,7 @@
 config CONFIG_GETTY
 	bool "getty"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  getty lets you log in on a tty, it is normally invoked by init.
 
@@ -103,6 +104,7 @@
 	bool "login"
 	default n
 	select CONFIG_FEATURE_SUID
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  login is used when signing onto a system.
 
@@ -122,6 +124,7 @@
 	bool "passwd"
 	default n
 	select CONFIG_FEATURE_SUID
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  passwd changes passwords for user and group accounts.  A normal user
 	  may only change the password for his/her own account, the super user
@@ -135,6 +138,7 @@
 	bool "su"
 	default n
 	select CONFIG_FEATURE_SUID
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  su is used to become another user during a login session.
 	  Invoked without a username, su defaults to becoming the super user.
@@ -152,6 +156,7 @@
 config CONFIG_SULOGIN
 	bool "sulogin"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  sulogin is invoked when the system goes into single user
 	  mode (this is done through an entry in inittab).

Modified: trunk/busybox/miscutils/Config.in
===================================================================
--- trunk/busybox/miscutils/Config.in	2006-09-07 05:43:38 UTC (rev 16062)
+++ trunk/busybox/miscutils/Config.in	2006-09-07 06:02:39 UTC (rev 16063)
@@ -23,6 +23,7 @@
 	bool "crond"
 	default n
 	select CONFIG_FEATURE_SUID
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  Crond is a background daemon that parses individual crontab
 	  files and executes commands on behalf of the users in question.
@@ -66,6 +67,7 @@
 config CONFIG_DEVFSD
 	bool "devfsd (obsolete)"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  This is deprecated, and will be removed at the end of 2008.
 

Modified: trunk/busybox/networking/Config.in
===================================================================
--- trunk/busybox/networking/Config.in	2006-09-07 05:43:38 UTC (rev 16062)
+++ trunk/busybox/networking/Config.in	2006-09-07 06:02:39 UTC (rev 16063)
@@ -33,6 +33,7 @@
 config CONFIG_FAKEIDENTD
 	bool "fakeidentd"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  fakeidentd listens on the ident port and returns a predefined
 	  fake value on any query.
@@ -288,6 +289,7 @@
 config CONFIG_INETD
 	bool "inetd"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  Internet superserver daemon
 
@@ -428,6 +430,7 @@
 config CONFIG_NAMEIF
 	bool "nameif"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  nameif is used to rename network interface by its MAC address.
 	  Renamed interfaces MUST be in the down state.
@@ -539,6 +542,7 @@
 config CONFIG_TELNETD
 	bool "telnetd"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  A daemon for the TELNET protocol, allowing you to log onto the host
 	  running the daemon.  Please keep in mind that the TELNET protocol
@@ -701,6 +705,7 @@
 config CONFIG_ZCIP
 	bool "zcip"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927.
 	  It's a daemon that allocates and defends a dynamically assigned

Modified: trunk/busybox/networking/udhcp/Config.in
===================================================================
--- trunk/busybox/networking/udhcp/Config.in	2006-09-07 05:43:38 UTC (rev 16062)
+++ trunk/busybox/networking/udhcp/Config.in	2006-09-07 06:02:39 UTC (rev 16063)
@@ -6,6 +6,7 @@
 config CONFIG_APP_UDHCPD
 	bool "udhcp Server (udhcpd)"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  uDHCPd is a DHCP server geared primarily toward embedded systems,
 	  while striving to be fully functional and RFC compliant.
@@ -26,6 +27,7 @@
 config CONFIG_APP_UDHCPC
 	bool "udhcp Client (udhcpc)"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  uDHCPc is a DHCP client geared primarily toward embedded systems,
 	  while striving to be fully functional and RFC compliant.
@@ -35,16 +37,6 @@
 
 	  See http://udhcp.busybox.net for further details.
 
-config CONFIG_FEATURE_UDHCP_SYSLOG
-	bool "Log udhcp messages to syslog (instead of stdout)"
-	default n
-	depends on CONFIG_APP_UDHCPD || CONFIG_APP_UDHCPC
-	help
-	  If selected, udhcpd will log all its messages to syslog, otherwise,
-	  it will attempt to log them to stdout.
-
-	  See http://udhcp.busybox.net for further details.
-
 config CONFIG_FEATURE_UDHCP_DEBUG
 	bool "Compile udhcp with noisy debugging messages"
 	default n

Modified: trunk/busybox/sysklogd/Config.in
===================================================================
--- trunk/busybox/sysklogd/Config.in	2006-09-07 05:43:38 UTC (rev 16062)
+++ trunk/busybox/sysklogd/Config.in	2006-09-07 06:02:39 UTC (rev 16063)
@@ -89,6 +89,7 @@
 	bool "klogd"
 	default n
 	depends on CONFIG_SYSLOGD
+	select CONFIG_FEATURE_SYSLOG
 	help
 	  klogd is a utility which intercepts and logs all
 	  messages from the Linux kernel and sends the messages
@@ -99,6 +100,7 @@
 config CONFIG_LOGGER
 	bool "logger"
 	default n
+	select CONFIG_FEATURE_SYSLOG
 	help
 	    The logger utility allows you to send arbitrary text
 	    messages to the system log (i.e. the 'syslogd' utility) so




More information about the busybox-cvs mailing list