Hi list, this patch makes the hardcoded paths for lease file (udhcpd) and default script (udhcpc) and conifg option. There are no size changes. The patch function is only to make bb more config friendly.
the patch is based on bb-1.9.1 re, wh
--- common.h.org 2008-02-12 17:03:01.000000000 +0100 +++ common.h 2008-02-19 19:10:37.000000000 +0100 @@ -12,7 +12,8 @@ #include "libbb.h" -#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" +//#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" +#define DEFAULT_SCRIPT CONFIG_DHCPC_DEFAULT_SCRIPT extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */
--- Config.in.org 2008-02-12 17:03:01.000000000 +0100 +++ Config.in 2008-02-19 19:13:27.000000000 +0100 @@ -42,6 +42,15 @@ to send SIGUSR1 for the initial writing, or updating. Any timed rewriting remains undisturbed +config DHCPD_LEASES_FILE + string "Absolute path to lease file" + default "/var/lib/misc/udhcpd.leases" + depends on APP_UDHCPD + help + The udhcpd stores address in lease files. Normaly it is save + to leave it untouched. + + config APP_UDHCPC bool "udhcp Client (udhcpc)" default n @@ -83,6 +92,16 @@ If selected, both client and server will support passing of domain search lists via option 119, specified in RFC3397. +config DHCPC_DEFAULT_SCRIPT + string "Absolute path to config script" + default "/usr/share/udhcpc/default.script" + depends on APP_UDHCPC + help + This script is called after udhcpc receives and answer. See + examples/udhcp for a working example. Normaly it is save + to leave this untouched. + + config UDHCPC_SLACK_FOR_BUGGY_SERVERS int "DHCP options slack buffer size" default 80
--- dhcpd.h.org 2008-02-12 17:03:01.000000000 +0100 +++ dhcpd.h 2008-02-19 19:06:11.000000000 +0100 @@ -9,7 +9,8 @@ /* the period of time the client is allowed to use that address */ #define LEASE_TIME (60*60*24*10) /* 10 days of seconds */ -#define LEASES_FILE "/var/lib/misc/udhcpd.leases" +//#define LEASES_FILE "/var/lib/misc/udhcpd.leases" +#define LEASES_FILE CONFIG_DHCPD_LEASES_FILE /* where to find the DHCP server configuration file */ #define DHCPD_CONF_FILE "/etc/udhcpd.conf"
_______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
