aboutsummaryrefslogtreecommitdiff
path: root/patches/udhcp_config_paths.diff
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-03-15 08:29:22 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-03-15 08:29:22 +0000
commitb16674f3c1a961e0b5d6a57745f5f749d95c641e (patch)
tree4c6d2217f4d8306c59cf1096f8664e1cfd167213 /patches/udhcp_config_paths.diff
parente7135df4a650f9197b633784472f45602524855b (diff)
downloadbusybox-w32-b16674f3c1a961e0b5d6a57745f5f749d95c641e.tar.gz
busybox-w32-b16674f3c1a961e0b5d6a57745f5f749d95c641e.tar.bz2
busybox-w32-b16674f3c1a961e0b5d6a57745f5f749d95c641e.zip
Remove trailing whitespace. Update copyright to include 2004.
git-svn-id: svn://busybox.net/trunk/busybox@8630 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'patches/udhcp_config_paths.diff')
-rw-r--r--patches/udhcp_config_paths.diff108
1 files changed, 54 insertions, 54 deletions
diff --git a/patches/udhcp_config_paths.diff b/patches/udhcp_config_paths.diff
index 299a68a8e..1d3a6b4b0 100644
--- a/patches/udhcp_config_paths.diff
+++ b/patches/udhcp_config_paths.diff
@@ -13,7 +13,7 @@ diff -u -r1.191 usage.h
13+ "\t-s,\t--script=file\tRun file at dhcp events (default: " \ 13+ "\t-s,\t--script=file\tRun file at dhcp events (default: " \
14+ CONFIG_UDHCPC_SCRIPT_PATH ")\n" \ 14+ CONFIG_UDHCPC_SCRIPT_PATH ")\n" \
15 "\t-v,\t--version\tDisplay version" 15 "\t-v,\t--version\tDisplay version"
16 16
17 #define udhcpd_trivial_usage \ 17 #define udhcpd_trivial_usage \
18Index: networking/udhcp/AUTHORS 18Index: networking/udhcp/AUTHORS
19=================================================================== 19===================================================================
@@ -24,11 +24,11 @@ diff -u -r1.3 AUTHORS
24+++ b/networking/udhcp/AUTHORS 5 Mar 2004 13:20:11 -0000 24+++ b/networking/udhcp/AUTHORS 5 Mar 2004 13:20:11 -0000
25@@ -10,5 +10,5 @@ 25@@ -10,5 +10,5 @@
26 Moreton Bay (http://www.moretonbay.com/) 26 Moreton Bay (http://www.moretonbay.com/)
27 Lineo (http://opensource.lineo.com)
28 Vladimir Oleynik <dzo@simtrea.ru> Size optimizations 27 Vladimir Oleynik <dzo@simtrea.ru> Size optimizations
28
29- 29-
30+Tony J. White <tjw@tjw.org> additional busybox build options 30+Tony J. White <tjw@tjw.org> additional busybox build options
31 31
32Index: networking/udhcp/Config.in 32Index: networking/udhcp/Config.in
33=================================================================== 33===================================================================
34RCS file: /var/cvs/busybox/networking/udhcp/Config.in,v 34RCS file: /var/cvs/busybox/networking/udhcp/Config.in,v
@@ -37,32 +37,32 @@ diff -u -r1.5 Config.in
37--- a/networking/udhcp/Config.in 22 Oct 2003 09:58:38 -0000 1.5 37--- a/networking/udhcp/Config.in 22 Oct 2003 09:58:38 -0000 1.5
38+++ b/networking/udhcp/Config.in 5 Mar 2004 13:20:11 -0000 38+++ b/networking/udhcp/Config.in 5 Mar 2004 13:20:11 -0000
39@@ -58,5 +58,62 @@ 39@@ -58,5 +58,62 @@
40 40
41 See http://udhcp.busybox.net for further details. 41 See http://udhcp.busybox.net for further details.
42 42
43+menu "udhcpd Configuration Options" 43+menu "udhcpd Configuration Options"
44+ depends on CONFIG_UDHCPD 44+ depends on CONFIG_UDHCPD
45+ 45+
46+config CONFIG_UDHCPD_CONF_PATH 46+config CONFIG_UDHCPD_CONF_PATH
47+ string "Path to default udhcpd.conf" 47+ string "Path to default udhcpd.conf"
48+ default "/etc/udhcpd.conf" 48+ default "/etc/udhcpd.conf"
49+ depends on CONFIG_UDHCPD 49+ depends on CONFIG_UDHCPD
50+ help 50+ help
51+ The full path to udhcpd's default configuration file. 51+ The full path to udhcpd's default configuration file.
52+ (default is: /etc/udhcpd.conf) 52+ (default is: /etc/udhcpd.conf)
53+ 53+
54+config CONFIG_UDHCPD_LEASE_PATH 54+config CONFIG_UDHCPD_LEASE_PATH
55+ string "Path to default udhcpd.leases" 55+ string "Path to default udhcpd.leases"
56+ default "/var/lib/misc/udhcpd.leases" 56+ default "/var/lib/misc/udhcpd.leases"
57+ depends on CONFIG_UDHCPD 57+ depends on CONFIG_UDHCPD
58+ help 58+ help
59+ The full path to udhcpd's default leases file. 59+ The full path to udhcpd's default leases file.
60+ (default is: /var/lib/misc/udhcpd.leases) 60+ (default is: /var/lib/misc/udhcpd.leases)
61+ 61+
62+config CONFIG_UDHCPD_PID_PATH 62+config CONFIG_UDHCPD_PID_PATH
63+ string "Path to default udhcpd PID file" 63+ string "Path to default udhcpd PID file"
64+ default "/var/run/udhcpd.pid" 64+ default "/var/run/udhcpd.pid"
65+ depends on CONFIG_UDHCPD 65+ depends on CONFIG_UDHCPD
66+ help 66+ help
67+ The full path to udhcpd's default pid file. 67+ The full path to udhcpd's default pid file.
68+ (default is: /var/run/udhcpd.pid) 68+ (default is: /var/run/udhcpd.pid)
@@ -79,26 +79,26 @@ diff -u -r1.5 Config.in
79+ The full path to udhcpc's default event script file. 79+ The full path to udhcpc's default event script file.
80+ (default is: /usr/share/udhcpc/default.script OR 80+ (default is: /usr/share/udhcpc/default.script OR
81+ /share/udhcpc/default.script if CONFIG_INSTALL_NO_USR is set) 81+ /share/udhcpc/default.script if CONFIG_INSTALL_NO_USR is set)
82+ 82+
83+ When udhcpc is started it executes this script to take care 83+ When udhcpc is started it executes this script to take care
84+ of system tasks after it completes DHCP communication. Such 84+ of system tasks after it completes DHCP communication. Such
85+ tasks include putting network interfaces up or down, setting 85+ tasks include putting network interfaces up or down, setting
86+ DNS info, adding routing information, etc. 86+ DNS info, adding routing information, etc.
87+ 87+
88+if CONFIG_INSTALL_NO_USR 88+if CONFIG_INSTALL_NO_USR
89+config CONFIG_UDHCPC_SCRIPT_PATH 89+config CONFIG_UDHCPC_SCRIPT_PATH
90+ default "/share/udhcpc/default.script" 90+ default "/share/udhcpc/default.script"
91+endif 91+endif
92+ 92+
93+if !CONFIG_INSTALL_NO_USR 93+if !CONFIG_INSTALL_NO_USR
94+config CONFIG_UDHCPC_SCRIPT_PATH 94+config CONFIG_UDHCPC_SCRIPT_PATH
95+ default "/usr/share/udhcpc/default.script" 95+ default "/usr/share/udhcpc/default.script"
96+endif 96+endif
97+ 97+
98+endmenu 98+endmenu
99+ 99+
100 endmenu 100 endmenu
101 101
102Index: networking/udhcp/README 102Index: networking/udhcp/README
103=================================================================== 103===================================================================
104RCS file: /var/cvs/busybox/networking/udhcp/README,v 104RCS file: /var/cvs/busybox/networking/udhcp/README,v
@@ -109,33 +109,33 @@ diff -u -r1.3 README
109@@ -9,27 +9,42 @@ 109@@ -9,27 +9,42 @@
110 compile time options 110 compile time options
111 ------------------- 111 -------------------
112 112
113-The Makefile contains three of the compile time options: 113-The Makefile contains three of the compile time options:
114+The following options can be adjusted when configuring busybox: 114+The following options can be adjusted when configuring busybox:
115 115
116- UDHCP_DEBUG: If UDHCP_DEBUG is defined, udhcpd will output extra 116- UDHCP_DEBUG: If UDHCP_DEBUG is defined, udhcpd will output extra
117- debugging output, compile with -g, and not fork to the background when 117- debugging output, compile with -g, and not fork to the background when
118- run. 118- run.
119- UDHCP_SYSLOG: If UDHCP_SYSLOG is defined, udhcpd will log all its 119- UDHCP_SYSLOG: If UDHCP_SYSLOG is defined, udhcpd will log all its
120- messages syslog, otherwise, it will attempt to log them to stdout. 120- messages syslog, otherwise, it will attempt to log them to stdout.
121- 121-
122- COMBINED_BINARY: If COMBINED_BINARY is define, one binary, udhcpd, 122- COMBINED_BINARY: If COMBINED_BINARY is define, one binary, udhcpd,
123- is created. If called as udhcpd, the dhcp server will be started. 123- is created. If called as udhcpd, the dhcp server will be started.
124- If called as udhcpc, the dhcp client will be started. 124- If called as udhcpc, the dhcp client will be started.
125- 125-
126-dhcpd.h contains the other three compile time options: 126-dhcpd.h contains the other three compile time options:
127- 127-
128- LEASE_TIME: The default lease time if not specified in the config 128- LEASE_TIME: The default lease time if not specified in the config
129- file. 129- file.
130+ CONFIG_FEATURE_UDHCP_DEBUG: 130+ CONFIG_FEATURE_UDHCP_DEBUG:
131+ If this is defined, udhcpd will output extra debugging output, 131+ If this is defined, udhcpd will output extra debugging output,
132+ compile with -g, and not fork to the background when run. 132+ compile with -g, and not fork to the background when run.
133 133
134- LEASES_FILE: The default file for storing leases. 134- LEASES_FILE: The default file for storing leases.
135- 135-
136- DHCPD_CONFIG_FILE: The defualt config file to use. 136- DHCPD_CONFIG_FILE: The defualt config file to use.
137+ CONFIG_FEATURE_UDHCP_SYSLOG: 137+ CONFIG_FEATURE_UDHCP_SYSLOG:
138+ If this is defined, udhcpd will log all its messages syslog, 138+ If this is defined, udhcpd will log all its messages syslog,
139+ otherwise, it will attempt to log them to stdout. 139+ otherwise, it will attempt to log them to stdout.
140+ 140+
141+ CONFIG_UDHCPD_CONF_PATH: 141+ CONFIG_UDHCPD_CONF_PATH:
@@ -158,14 +158,14 @@ diff -u -r1.3 README
158+ 158+
159+ 159+
160+dhcpd.h contains the another compile time option: 160+dhcpd.h contains the another compile time option:
161 161
162+ LEASE_TIME: 162+ LEASE_TIME:
163+ The default lease time if not specified in the config file. 163+ The default lease time if not specified in the config file.
164+ This option can also be changed at runtime with the 'lease' 164+ This option can also be changed at runtime with the 'lease'
165+ configuration option. 165+ configuration option.
166+ 166+
167 options.c contains a set of dhcp options for the client: 167 options.c contains a set of dhcp options for the client:
168 168
169 name[10]: The name of the option as it will appear in scripts 169 name[10]: The name of the option as it will appear in scripts
170Index: networking/udhcp/README.udhcpc 170Index: networking/udhcp/README.udhcpc
171=================================================================== 171===================================================================
@@ -182,8 +182,8 @@ diff -u -r1.3 README.udhcpc
182+ /usr/share/udhcpc/default.script or 182+ /usr/share/udhcpc/default.script or
183+ CONFIG_UDHCPC_SCRIPT_PATH at build time) 183+ CONFIG_UDHCPC_SCRIPT_PATH at build time)
184 -v, --version Display version 184 -v, --version Display version
185 185
186 186
187Index: networking/udhcp/README.udhcpd 187Index: networking/udhcp/README.udhcpd
188=================================================================== 188===================================================================
189RCS file: /var/cvs/busybox/networking/udhcp/README.udhcpd,v 189RCS file: /var/cvs/busybox/networking/udhcp/README.udhcpd,v
@@ -192,21 +192,21 @@ diff -u -r1.1 README.udhcpd
192--- a/networking/udhcp/README.udhcpd 31 Oct 2002 19:21:27 -0000 1.1 192--- a/networking/udhcp/README.udhcpd 31 Oct 2002 19:21:27 -0000 1.1
193+++ b/networking/udhcp/README.udhcpd 5 Mar 2004 13:20:11 -0000 193+++ b/networking/udhcp/README.udhcpd 5 Mar 2004 13:20:11 -0000
194@@ -50,10 +50,14 @@ 194@@ -50,10 +50,14 @@
195 195
196 compile time options 196 compile time options
197 ------------------- 197 -------------------
198+ 198+
199+During busybox configuration, you can change the default paths for 199+During busybox configuration, you can change the default paths for
200+udhcpd.conf, udhcpd.leases, and udhcpd.pid files. See README for 200+udhcpd.conf, udhcpd.leases, and udhcpd.pid files. See README for
201+more details. 201+more details.
202 202
203-dhcpd.h contains the other two compile time options: 203-dhcpd.h contains the other two compile time options:
204+dhcpd.h contains the compile time option: 204+dhcpd.h contains the compile time option:
205 205
206 LEASE_TIME: The default lease time if not specified in the config 206 LEASE_TIME: The default lease time if not specified in the config
207 file. 207 file.
208+ 208+
209 209
210- DHCPD_CONFIG_FILE: The defualt config file to use. 210- DHCPD_CONFIG_FILE: The defualt config file to use.
211Index: networking/udhcp/dhcpc.h 211Index: networking/udhcp/dhcpc.h
212=================================================================== 212===================================================================
@@ -218,14 +218,14 @@ diff -u -r1.4 dhcpc.h
218@@ -2,7 +2,11 @@ 218@@ -2,7 +2,11 @@
219 #ifndef _DHCPC_H 219 #ifndef _DHCPC_H
220 #define _DHCPC_H 220 #define _DHCPC_H
221 221
222-#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" 222-#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
223+#ifdef CONFIG_UDHCPC_SCRIPT_PATH 223+#ifdef CONFIG_UDHCPC_SCRIPT_PATH
224+ #define DEFAULT_SCRIPT CONFIG_UDHCPC_SCRIPT_PATH 224+ #define DEFAULT_SCRIPT CONFIG_UDHCPC_SCRIPT_PATH
225+#else 225+#else
226+ #define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" 226+ #define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
227+#endif 227+#endif
228 228
229 /* allow libbb_udhcp.h to redefine DEFAULT_SCRIPT */ 229 /* allow libbb_udhcp.h to redefine DEFAULT_SCRIPT */
230 #include "libbb_udhcp.h" 230 #include "libbb_udhcp.h"
231Index: networking/udhcp/dhcpd.c 231Index: networking/udhcp/dhcpd.c
@@ -240,25 +240,25 @@ diff -u -r1.5 dhcpd.c
240 int max_sock; 240 int max_sock;
241 unsigned long num_ips; 241 unsigned long num_ips;
242+ int daemonize = 1; 242+ int daemonize = 1;
243+ 243+
244+ while (strcmp(argv[1],"-f")==0 || strcmp(argv[1],"--foreground")==0) { 244+ while (strcmp(argv[1],"-f")==0 || strcmp(argv[1],"--foreground")==0) {
245+ daemonize = 0; 245+ daemonize = 0;
246+ argv++; 246+ argv++;
247+ argc--; 247+ argc--;
248+ } 248+ }
249 249
250 memset(&server_config, 0, sizeof(struct server_config_t)); 250 memset(&server_config, 0, sizeof(struct server_config_t));
251 read_config(argc < 2 ? DHCPD_CONF_FILE : argv[1]); 251 read_config(argc < 2 ? DHCPD_CONF_FILE : argv[1]);
252@@ -99,9 +106,8 @@ 252@@ -99,9 +106,8 @@
253 &server_config.server, server_config.arp) < 0) 253 &server_config.server, server_config.arp) < 0)
254 return 1; 254 return 1;
255 255
256-#ifndef UDHCP_DEBUG 256-#ifndef UDHCP_DEBUG
257- background(server_config.pidfile); /* hold lock during fork. */ 257- background(server_config.pidfile); /* hold lock during fork. */
258-#endif 258-#endif
259+ if(daemonize) 259+ if(daemonize)
260+ background(server_config.pidfile); /* hold lock during fork. */ 260+ background(server_config.pidfile); /* hold lock during fork. */
261 261
262 /* Setup the signal pipe */ 262 /* Setup the signal pipe */
263 udhcp_sp_setup(); 263 udhcp_sp_setup();
264Index: networking/udhcp/dhcpd.h 264Index: networking/udhcp/dhcpd.h
@@ -269,7 +269,7 @@ diff -u -r1.5 dhcpd.h
269--- a/networking/udhcp/dhcpd.h 30 Jan 2004 23:45:12 -0000 1.5 269--- a/networking/udhcp/dhcpd.h 30 Jan 2004 23:45:12 -0000 1.5
270+++ b/networking/udhcp/dhcpd.h 5 Mar 2004 13:20:12 -0000 270+++ b/networking/udhcp/dhcpd.h 5 Mar 2004 13:20:12 -0000
271@@ -15,11 +15,25 @@ 271@@ -15,11 +15,25 @@
272 272
273 /* the period of time the client is allowed to use that address */ 273 /* the period of time the client is allowed to use that address */
274 #define LEASE_TIME (60*60*24*10) /* 10 days of seconds */ 274 #define LEASE_TIME (60*60*24*10) /* 10 days of seconds */
275-#define LEASES_FILE "/var/lib/misc/udhcpd.leases" 275-#define LEASES_FILE "/var/lib/misc/udhcpd.leases"
@@ -279,7 +279,7 @@ diff -u -r1.5 dhcpd.h
279+#else 279+#else
280+ #define LEASES_FILE "/var/lib/misc/udhcpd.leases" 280+ #define LEASES_FILE "/var/lib/misc/udhcpd.leases"
281+#endif 281+#endif
282 282
283 /* where to find the DHCP server configuration file */ 283 /* where to find the DHCP server configuration file */
284-#define DHCPD_CONF_FILE "/etc/udhcpd.conf" 284-#define DHCPD_CONF_FILE "/etc/udhcpd.conf"
285+#ifdef CONFIG_UDHCPD_CONF_PATH 285+#ifdef CONFIG_UDHCPD_CONF_PATH
@@ -287,7 +287,7 @@ diff -u -r1.5 dhcpd.h
287+#else 287+#else
288+ #define DHCPD_CONF_FILE "/etc/udhcpd.conf" 288+ #define DHCPD_CONF_FILE "/etc/udhcpd.conf"
289+#endif 289+#endif
290 290
291+#ifdef CONFIG_UDHCPD_PID_PATH 291+#ifdef CONFIG_UDHCPD_PID_PATH
292+ #define DHCPD_PID_FILE CONFIG_UDHCPD_PID_PATH 292+ #define DHCPD_PID_FILE CONFIG_UDHCPD_PID_PATH
293+#else 293+#else
@@ -322,7 +322,7 @@ diff -u -r1.5 libbb_udhcp.h
322@@ -3,11 +3,6 @@ 322@@ -3,11 +3,6 @@
323 /* bit of a hack, do this no matter what the order of the includes. 323 /* bit of a hack, do this no matter what the order of the includes.
324 * (for busybox) */ 324 * (for busybox) */
325 325
326-#ifdef CONFIG_INSTALL_NO_USR 326-#ifdef CONFIG_INSTALL_NO_USR
327-#undef DEFUALT_SCRIPT 327-#undef DEFUALT_SCRIPT
328-#define DEFAULT_SCRIPT "/share/udhcpc/default.script" 328-#define DEFAULT_SCRIPT "/share/udhcpc/default.script"
@@ -330,4 +330,4 @@ diff -u -r1.5 libbb_udhcp.h
330- 330-
331 #ifndef _LIBBB_UDHCP_H 331 #ifndef _LIBBB_UDHCP_H
332 #define _LIBBB_UDHCP_H 332 #define _LIBBB_UDHCP_H
333 333