aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Dill <Russ.Dill@asu.edu>2003-12-16 02:30:53 +0000
committerRuss Dill <Russ.Dill@asu.edu>2003-12-16 02:30:53 +0000
commit8b3845106a086ea78a24d7981ee41e76070e83fe (patch)
treea998a755c5f910484ce292ffe916f59027b89231
parent4b77acafa6f8b907903ea4a140b7c4a314ed71b2 (diff)
downloadbusybox-w32-8b3845106a086ea78a24d7981ee41e76070e83fe.tar.gz
busybox-w32-8b3845106a086ea78a24d7981ee41e76070e83fe.tar.bz2
busybox-w32-8b3845106a086ea78a24d7981ee41e76070e83fe.zip
why the complication of a static string rather than a define? gcc isn't dumb
-rw-r--r--networking/udhcp/dhcpd.h3
-rw-r--r--networking/udhcp/dumpleases.c2
-rw-r--r--networking/udhcp/files.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index e219143cc..d53a809ca 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -5,7 +5,9 @@
5#include <netinet/ip.h> 5#include <netinet/ip.h>
6#include <netinet/udp.h> 6#include <netinet/udp.h>
7 7
8#include "libbb_udhcp.h"
8#include "leases.h" 9#include "leases.h"
10#include "version.h"
9 11
10/************************************/ 12/************************************/
11/* Defaults _you_ may want to tweak */ 13/* Defaults _you_ may want to tweak */
@@ -13,6 +15,7 @@
13 15
14/* the period of time the client is allowed to use that address */ 16/* the period of time the client is allowed to use that address */
15#define LEASE_TIME (60*60*24*10) /* 10 days of seconds */ 17#define LEASE_TIME (60*60*24*10) /* 10 days of seconds */
18#define LEASES_FILE "/var/lib/misc/udhcpd.leases"
16 19
17/* where to find the DHCP server configuration file */ 20/* where to find the DHCP server configuration file */
18#define DHCPD_CONF_FILE "/etc/udhcpd.conf" 21#define DHCPD_CONF_FILE "/etc/udhcpd.conf"
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c
index 5cb3a156f..4c1ee131f 100644
--- a/networking/udhcp/dumpleases.c
+++ b/networking/udhcp/dumpleases.c
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
43 FILE *fp; 43 FILE *fp;
44 int i, c, mode = REMAINING; 44 int i, c, mode = REMAINING;
45 long expires; 45 long expires;
46 const char *file = leases_file; 46 const char *file = LEASES_FILE;
47 struct dhcpOfferedAddr lease; 47 struct dhcpOfferedAddr lease;
48 struct in_addr addr; 48 struct in_addr addr;
49 49
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 0597dc310..23d8c0094 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -167,7 +167,7 @@ static const struct config_keyword keywords[] = {
167 {"conflict_time",read_u32,&(server_config.conflict_time),"3600"}, 167 {"conflict_time",read_u32,&(server_config.conflict_time),"3600"},
168 {"offer_time", read_u32, &(server_config.offer_time), "60"}, 168 {"offer_time", read_u32, &(server_config.offer_time), "60"},
169 {"min_lease", read_u32, &(server_config.min_lease), "60"}, 169 {"min_lease", read_u32, &(server_config.min_lease), "60"},
170 {"lease_file", read_str, &(server_config.lease_file), leases_file}, 170 {"lease_file", read_str, &(server_config.lease_file), LEASES_FILE},
171 {"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"}, 171 {"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"},
172 {"notify_file", read_str, &(server_config.notify_file), ""}, 172 {"notify_file", read_str, &(server_config.notify_file), ""},
173 {"siaddr", read_ip, &(server_config.siaddr), "0.0.0.0"}, 173 {"siaddr", read_ip, &(server_config.siaddr), "0.0.0.0"},