2 ===================================================================
3 RCS file: /var/cvs/busybox/include/usage.h,v
4 retrieving revision 1.191
5 diff -u -r1.191 usage.h
6 --- a/include/usage.h 25 Feb 2004 10:35:55 -0000 1.191
7 +++ b/include/usage.h 5 Mar 2004 13:20:11 -0000
9 "\t-p,\t--pidfile=file\tStore process ID of daemon in file\n" \
10 "\t-q,\t--quit\tQuit after obtaining lease\n" \
11 "\t-r,\t--request=IP\tIP address to request (default: none)\n" \
12 - "\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \
13 + "\t-s,\t--script=file\tRun file at dhcp events (default: " \
14 + CONFIG_UDHCPC_SCRIPT_PATH ")\n" \
15 "\t-v,\t--version\tDisplay version"
17 #define udhcpd_trivial_usage \
18 Index: networking/udhcp/AUTHORS
19 ===================================================================
20 RCS file: /var/cvs/busybox/networking/udhcp/AUTHORS,v
21 retrieving revision 1.3
23 --- a/networking/udhcp/AUTHORS 18 Dec 2003 22:25:38 -0000 1.3
24 +++ b/networking/udhcp/AUTHORS 5 Mar 2004 13:20:11 -0000
26 Moreton Bay (http://www.moretonbay.com/)
27 Vladimir Oleynik <dzo@simtrea.ru> Size optimizations
30 +Tony J. White <tjw@tjw.org> additional busybox build options
32 Index: networking/udhcp/Config.in
33 ===================================================================
34 RCS file: /var/cvs/busybox/networking/udhcp/Config.in,v
35 retrieving revision 1.5
36 diff -u -r1.5 Config.in
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
41 See http://udhcp.busybox.net for further details.
43 +menu "udhcpd Configuration Options"
44 + depends on CONFIG_UDHCPD
46 +config CONFIG_UDHCPD_CONF_PATH
47 + string "Path to default udhcpd.conf"
48 + default "/etc/udhcpd.conf"
49 + depends on CONFIG_UDHCPD
51 + The full path to udhcpd's default configuration file.
52 + (default is: /etc/udhcpd.conf)
54 +config CONFIG_UDHCPD_LEASE_PATH
55 + string "Path to default udhcpd.leases"
56 + default "/var/lib/misc/udhcpd.leases"
57 + depends on CONFIG_UDHCPD
59 + The full path to udhcpd's default leases file.
60 + (default is: /var/lib/misc/udhcpd.leases)
62 +config CONFIG_UDHCPD_PID_PATH
63 + string "Path to default udhcpd PID file"
64 + default "/var/run/udhcpd.pid"
65 + depends on CONFIG_UDHCPD
67 + The full path to udhcpd's default pid file.
68 + (default is: /var/run/udhcpd.pid)
72 +menu "udhcpc Configuration Options"
73 + depends on CONFIG_UDHCPC
75 +config CONFIG_UDHCPC_SCRIPT_PATH
76 + string "Path to default udhcpc event script"
77 + depends on CONFIG_UDHCPC
79 + The full path to udhcpc's default event script file.
80 + (default is: /usr/share/udhcpc/default.script OR
81 + /share/udhcpc/default.script if CONFIG_INSTALL_NO_USR is set)
83 + When udhcpc is started it executes this script to take care
84 + of system tasks after it completes DHCP communication. Such
85 + tasks include putting network interfaces up or down, setting
86 + DNS info, adding routing information, etc.
88 +if CONFIG_INSTALL_NO_USR
89 +config CONFIG_UDHCPC_SCRIPT_PATH
90 + default "/share/udhcpc/default.script"
93 +if !CONFIG_INSTALL_NO_USR
94 +config CONFIG_UDHCPC_SCRIPT_PATH
95 + default "/usr/share/udhcpc/default.script"
102 Index: networking/udhcp/README
103 ===================================================================
104 RCS file: /var/cvs/busybox/networking/udhcp/README,v
105 retrieving revision 1.3
107 --- a/networking/udhcp/README 18 Dec 2003 22:25:38 -0000 1.3
108 +++ b/networking/udhcp/README 5 Mar 2004 13:20:11 -0000
113 -The Makefile contains three of the compile time options:
114 +The following options can be adjusted when configuring busybox:
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
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.
122 - COMBINED_BINARY: If COMBINED_BINARY is define, one binary, udhcpd,
123 - is created. If called as udhcpd, the dhcp server will be started.
124 - If called as udhcpc, the dhcp client will be started.
126 -dhcpd.h contains the other three compile time options:
128 - LEASE_TIME: The default lease time if not specified in the config
130 + CONFIG_FEATURE_UDHCP_DEBUG:
131 + If this is defined, udhcpd will output extra debugging output,
132 + compile with -g, and not fork to the background when run.
134 - LEASES_FILE: The default file for storing leases.
136 - DHCPD_CONFIG_FILE: The defualt config file to use.
137 + CONFIG_FEATURE_UDHCP_SYSLOG:
138 + If this is defined, udhcpd will log all its messages syslog,
139 + otherwise, it will attempt to log them to stdout.
141 + CONFIG_UDHCPD_CONF_PATH:
142 + The full path to udhcpd's default configuration file.
144 + CONFIG_UDHCPD_LEASE_PATH:
145 + The full path to udhcpd's default leases file.
147 + CONFIG_UDHCPD_PID_PATH:
148 + The full path to udhcpd's default pid file.
150 + CONFIG_UDHCPC_SCRIPT_PATH:
151 + The full path to udhcpc's default event script file.
152 + (default is: /usr/share/udhcpc/default.script)
154 + When udhcpc is started it executes this script to take care
155 + of system tasks after it completes DHCP communication. Such
156 + tasks include putting network interfaces up or down, setting
157 + DNS info, adding routing information, etc.
160 +dhcpd.h contains the another compile time option:
163 + The default lease time if not specified in the config file.
164 + This option can also be changed at runtime with the 'lease'
165 + configuration option.
167 options.c contains a set of dhcp options for the client:
169 name[10]: The name of the option as it will appear in scripts
170 Index: networking/udhcp/README.udhcpc
171 ===================================================================
172 RCS file: /var/cvs/busybox/networking/udhcp/README.udhcpc,v
173 retrieving revision 1.3
174 diff -u -r1.3 README.udhcpc
175 --- a/networking/udhcp/README.udhcpc 11 Dec 2002 21:12:44 -0000 1.3
176 +++ b/networking/udhcp/README.udhcpc 5 Mar 2004 13:20:11 -0000
178 -q, --quit Quit after obtaining lease
179 -r, --request=IP IP address to request (default: none)
180 -s, --script=file Run file at dhcp events (default:
181 - /usr/share/udhcpc/default.script)
182 + /usr/share/udhcpc/default.script or
183 + CONFIG_UDHCPC_SCRIPT_PATH at build time)
184 -v, --version Display version
187 Index: networking/udhcp/README.udhcpd
188 ===================================================================
189 RCS file: /var/cvs/busybox/networking/udhcp/README.udhcpd,v
190 retrieving revision 1.1
191 diff -u -r1.1 README.udhcpd
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
199 +During busybox configuration, you can change the default paths for
200 +udhcpd.conf, udhcpd.leases, and udhcpd.pid files. See README for
203 -dhcpd.h contains the other two compile time options:
204 +dhcpd.h contains the compile time option:
206 LEASE_TIME: The default lease time if not specified in the config
210 - DHCPD_CONFIG_FILE: The defualt config file to use.
211 Index: networking/udhcp/dhcpc.h
212 ===================================================================
213 RCS file: /var/cvs/busybox/networking/udhcp/dhcpc.h,v
214 retrieving revision 1.4
215 diff -u -r1.4 dhcpc.h
216 --- a/networking/udhcp/dhcpc.h 30 Jan 2004 23:45:12 -0000 1.4
217 +++ b/networking/udhcp/dhcpc.h 5 Mar 2004 13:20:11 -0000
222 -#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
223 +#ifdef CONFIG_UDHCPC_SCRIPT_PATH
224 + #define DEFAULT_SCRIPT CONFIG_UDHCPC_SCRIPT_PATH
226 + #define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
229 /* allow libbb_udhcp.h to redefine DEFAULT_SCRIPT */
230 #include "libbb_udhcp.h"
231 Index: networking/udhcp/dhcpd.c
232 ===================================================================
233 RCS file: /var/cvs/busybox/networking/udhcp/dhcpd.c,v
234 retrieving revision 1.5
235 diff -u -r1.5 dhcpd.c
236 --- a/networking/udhcp/dhcpd.c 30 Jan 2004 23:45:12 -0000 1.5
237 +++ b/networking/udhcp/dhcpd.c 5 Mar 2004 13:20:11 -0000
239 struct dhcpOfferedAddr *lease;
241 unsigned long num_ips;
244 + while (strcmp(argv[1],"-f")==0 || strcmp(argv[1],"--foreground")==0) {
250 memset(&server_config, 0, sizeof(struct server_config_t));
251 read_config(argc < 2 ? DHCPD_CONF_FILE : argv[1]);
253 &server_config.server, server_config.arp) < 0)
257 - background(server_config.pidfile); /* hold lock during fork. */
260 + background(server_config.pidfile); /* hold lock during fork. */
262 /* Setup the signal pipe */
264 Index: networking/udhcp/dhcpd.h
265 ===================================================================
266 RCS file: /var/cvs/busybox/networking/udhcp/dhcpd.h,v
267 retrieving revision 1.5
268 diff -u -r1.5 dhcpd.h
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
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 */
275 -#define LEASES_FILE "/var/lib/misc/udhcpd.leases"
277 +#ifdef CONFIG_UDHCPD_LEASE_PATH
278 + #define LEASES_FILE CONFIG_UDHCPD_LEASE_PATH
280 + #define LEASES_FILE "/var/lib/misc/udhcpd.leases"
283 /* where to find the DHCP server configuration file */
284 -#define DHCPD_CONF_FILE "/etc/udhcpd.conf"
285 +#ifdef CONFIG_UDHCPD_CONF_PATH
286 + #define DHCPD_CONF_FILE CONFIG_UDHCPD_CONF_PATH
288 + #define DHCPD_CONF_FILE "/etc/udhcpd.conf"
291 +#ifdef CONFIG_UDHCPD_PID_PATH
292 + #define DHCPD_PID_FILE CONFIG_UDHCPD_PID_PATH
294 + #define DHCPD_PID_FILE "/var/run/udhcpd.pid"
296 /*****************************************************************/
297 /* Do not modify below here unless you know what you are doing!! */
298 /*****************************************************************/
299 Index: networking/udhcp/files.c
300 ===================================================================
301 RCS file: /var/cvs/busybox/networking/udhcp/files.c,v
302 retrieving revision 1.13
303 diff -u -r1.13 files.c
304 --- a/networking/udhcp/files.c 30 Jan 2004 23:45:12 -0000 1.13
305 +++ b/networking/udhcp/files.c 5 Mar 2004 13:20:13 -0000
307 {"offer_time", read_u32, &(server_config.offer_time), "60"},
308 {"min_lease", read_u32, &(server_config.min_lease), "60"},
309 {"lease_file", read_str, &(server_config.lease_file), LEASES_FILE},
310 - {"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"},
311 + {"pidfile", read_str, &(server_config.pidfile), DHCPD_PID_FILE},
312 {"notify_file", read_str, &(server_config.notify_file), ""},
313 {"siaddr", read_ip, &(server_config.siaddr), "0.0.0.0"},
314 {"sname", read_str, &(server_config.sname), ""},
315 Index: networking/udhcp/libbb_udhcp.h
316 ===================================================================
317 RCS file: /var/cvs/busybox/networking/udhcp/libbb_udhcp.h,v
318 retrieving revision 1.5
319 diff -u -r1.5 libbb_udhcp.h
320 --- a/networking/udhcp/libbb_udhcp.h 18 Dec 2003 22:25:38 -0000 1.5
321 +++ b/networking/udhcp/libbb_udhcp.h 5 Mar 2004 13:20:13 -0000
323 /* bit of a hack, do this no matter what the order of the includes.
326 -#ifdef CONFIG_INSTALL_NO_USR
327 -#undef DEFUALT_SCRIPT
328 -#define DEFAULT_SCRIPT "/share/udhcpc/default.script"
331 #ifndef _LIBBB_UDHCP_H
332 #define _LIBBB_UDHCP_H