diff options
author | Denis Vlasenko | 2007-08-15 20:03:36 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-08-15 20:03:36 +0000 |
commit | 9f7b92a2e13b184b1d6f7d9fbddc133666224bcf (patch) | |
tree | 44fec109468bd6f954e01ca192b289b6fb1ce7d8 /networking/udhcp | |
parent | 384b1d12f957a3a4c80fb32bc29cb79c282ac361 (diff) | |
download | busybox-9f7b92a2e13b184b1d6f7d9fbddc133666224bcf.zip busybox-9f7b92a2e13b184b1d6f7d9fbddc133666224bcf.tar.gz |
dhcpd: make -S and -f actually work
Diffstat (limited to 'networking/udhcp')
-rw-r--r-- | networking/udhcp/dhcpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index d8e80e3..fb42e2f 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c @@ -37,6 +37,7 @@ int udhcpd_main(int argc, char **argv) struct dhcpOfferedAddr *lease, static_lease; opt = getopt32(argc, argv, "fS"); + argv += optind; if (!(opt & 1)) { /* no -f */ bb_daemonize_or_rexec(0, argv); @@ -50,7 +51,7 @@ int udhcpd_main(int argc, char **argv) /* Would rather not do read_config before daemonization - * otherwise NOMMU machines will parse config twice */ - read_config(argv[1] ? argv[1] : DHCPD_CONF_FILE); + read_config(argv[0] ? argv[0] : DHCPD_CONF_FILE); /* Make sure fd 0,1,2 are open */ bb_sanitize_stdio(); |