diff options
Diffstat (limited to 'networking/udhcp/dhcpd.c')
-rw-r--r-- | networking/udhcp/dhcpd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index 9d6604943..acfdaa8c3 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
@@ -46,6 +46,12 @@ | |||
46 | #include "dhcpc.h" | 46 | #include "dhcpc.h" |
47 | #include "dhcpd.h" | 47 | #include "dhcpd.h" |
48 | 48 | ||
49 | #if ENABLE_PID_FILE_PATH | ||
50 | #define PID_FILE_PATH CONFIG_PID_FILE_PATH | ||
51 | #else | ||
52 | #define PID_FILE_PATH "/var/run" | ||
53 | #endif | ||
54 | |||
49 | /* globals */ | 55 | /* globals */ |
50 | #define g_leases ((struct dyn_lease*)ptr_to_globals) | 56 | #define g_leases ((struct dyn_lease*)ptr_to_globals) |
51 | /* struct server_data_t server_data is in bb_common_bufsiz1 */ | 57 | /* struct server_data_t server_data is in bb_common_bufsiz1 */ |
@@ -406,7 +412,7 @@ static const struct config_keyword keywords[] = { | |||
406 | {"offer_time" , read_u32 , OFS(offer_time ), "60"}, | 412 | {"offer_time" , read_u32 , OFS(offer_time ), "60"}, |
407 | {"min_lease" , read_u32 , OFS(min_lease_sec), "60"}, | 413 | {"min_lease" , read_u32 , OFS(min_lease_sec), "60"}, |
408 | {"lease_file" , read_str , OFS(lease_file ), LEASES_FILE}, | 414 | {"lease_file" , read_str , OFS(lease_file ), LEASES_FILE}, |
409 | {"pidfile" , read_str , OFS(pidfile ), "/var/run/udhcpd.pid"}, | 415 | {"pidfile" , read_str , OFS(pidfile ), PID_FILE_PATH "/udhcpd.pid"}, |
410 | {"siaddr" , udhcp_str2nip , OFS(siaddr_nip ), "0.0.0.0"}, | 416 | {"siaddr" , udhcp_str2nip , OFS(siaddr_nip ), "0.0.0.0"}, |
411 | /* keywords with no defaults must be last! */ | 417 | /* keywords with no defaults must be last! */ |
412 | {"option" , read_optset , OFS(options ), ""}, | 418 | {"option" , read_optset , OFS(options ), ""}, |