summaryrefslogtreecommitdiff
path: root/patches/udhcpd_foreground.diff
diff options
context:
space:
mode:
authorEric Andersen2004-03-15 08:29:22 +0000
committerEric Andersen2004-03-15 08:29:22 +0000
commitc7bda1ce659294d6e22c06e087f6f265983c7578 (patch)
tree4c6d2217f4d8306c59cf1096f8664e1cfd167213 /patches/udhcpd_foreground.diff
parent8854004b41065b3d081af7f3df13a100b0c8bfbe (diff)
downloadbusybox-c7bda1ce659294d6e22c06e087f6f265983c7578.zip
busybox-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'patches/udhcpd_foreground.diff')
-rw-r--r--patches/udhcpd_foreground.diff8
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/udhcpd_foreground.diff b/patches/udhcpd_foreground.diff
index 9f1e3b9..3b8c7eb 100644
--- a/patches/udhcpd_foreground.diff
+++ b/patches/udhcpd_foreground.diff
@@ -10,24 +10,24 @@ diff -u -r1.5 dhcpd.c
int max_sock;
unsigned long num_ips;
+ int daemonize = 1;
-+
++
+ while (strcmp(argv[1],"-f")==0 || strcmp(argv[1],"--foreground")==0) {
+ daemonize = 0;
+ argv++;
+ argc--;
+ }
-
+
memset(&server_config, 0, sizeof(struct server_config_t));
read_config(argc < 2 ? DHCPD_CONF_FILE : argv[1]);
@@ -99,9 +106,8 @@
&server_config.server, server_config.arp) < 0)
return 1;
-
+
-#ifndef UDHCP_DEBUG
- background(server_config.pidfile); /* hold lock during fork. */
-#endif
+ if(daemonize)
+ background(server_config.pidfile); /* hold lock during fork. */
-
+
/* Setup the signal pipe */
udhcp_sp_setup();