udhcp: new config option "Rewrite the lease file at every new acknowledge"

(Mats Erik Andersson <mats@blue2net.com> (Blue2Net AB))
udhcp: consistently treat server_config.start/end IPs as host-order
       fix IP parsing for 64bit machines
       fix unsafe hton macro usage in read_opt()
       do not chdir("/") when daemonizing
       fix help text
This commit is contained in:
Denis Vlasenko
2007-07-01 17:05:57 +00:00
parent dc7a5eae36
commit c82b5108e1
10 changed files with 153 additions and 117 deletions

View File

@@ -114,8 +114,7 @@ static void client_background(void)
* If that will be properly disabled for NOMMU, client_background()
* will work on NOMMU too */
#else
// chdir(/) is problematic. Imagine that e.g. pidfile name is RELATIVE! what will unlink do then, eh?
bb_daemonize(DAEMON_CHDIR_ROOT);
bb_daemonize(0);
/* rewrite pidfile, as our pid is different now */
if (client_config.pidfile)
write_pidfile(client_config.pidfile);