[PATCH 3/3] zcip: add an option to force logging to syslog even if running -f
Stam, Michel [FINT]
M.Stam at fugro.nl
Wed Oct 15 06:46:25 UTC 2014
Does anyone have time to look at this?
Kind regards,
Michel Stam
-----Original Message-----
From: Michel Stam [mailto:m.stam at fugro.nl]
Sent: Wednesday, October 08, 2014 14:45 PM
To: busybox at busybox.net
Cc: Stam, Michel [FINT]
Subject: [PATCH 3/3] zcip: add an option to force logging to syslog even
if running -f
Signed-off-by: Michel Stam <m.stam at fugro.nl>
---
networking/zcip.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/networking/zcip.c b/networking/zcip.c index
2a57543..2997503 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -32,6 +32,7 @@
//usage: "\n -r 169.254.x.x Request this address first"
//usage: "\n -l w.x.0.0 Use this class B range instead
of 169.254"
//usage: "\n -v Verbose"
+//usage: "\n -s Log to syslog (even in
foreground)"
//usage: "\n"
//usage: "\nWith no -q, runs continuously monitoring for ARP
conflicts,"
//usage: "\nexits only on I/O errors (link down etc)"
@@ -238,7 +239,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
// parse commandline: prog [options] ifname script
// exactly 2 args; -v accumulates and implies -f
opt_complementary = "=2:vv:vf";
- opts = getopt32(argv, "fqr:l:v", &r_opt, &l_opt, &verbose);
+ opts = getopt32(argv, "fqr:l:vs", &r_opt, &l_opt, &verbose);
#if !BB_MMU
// on NOMMU reexec early (or else we will rerun things twice)
if (!FOREGROUND)
@@ -248,7 +249,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
// (need to do it before openlog to prevent openlog from taking
// fd 3 (sock_fd==3))
xmove_fd(xsocket(AF_PACKET, SOCK_PACKET, htons(ETH_P_ARP)),
sock_fd);
- if (!FOREGROUND) {
+ if (!FOREGROUND || (opts & 16)) {
// do it before all bb_xx_msg calls
openlog(applet_name, 0, LOG_DAEMON);
logmode |= LOGMODE_SYSLOG;
--
1.7.12.1
More information about the busybox
mailing list