From: Roy Marples Date: Wed, 20 Aug 2008 08:50:38 +0000 (+0000) Subject: Move the --renew option to --rebind as it's more accurate (both are -n). Support... X-Git-Tag: v4.0.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0235df9d663b986bb4a0c9554209555673e5d312;p=thirdparty%2Fdhcpcd.git Move the --renew option to --rebind as it's more accurate (both are -n). Support --renew when CMDLINE_COMPAT is enabled. --- diff --git a/dhcpcd.8.in b/dhcpcd.8.in index ed422aa9..6c82d3fb 100644 --- a/dhcpcd.8.in +++ b/dhcpcd.8.in @@ -169,6 +169,8 @@ process running on the to release its lease, deconfigure the .Ar interface and then exit. +.Nm +then waits until this process has exited. .It Fl l , -leasetime Ar seconds Request a specific lease time in .Ar seconds . @@ -190,17 +192,27 @@ Request the DHCP .Ar option variable for use in .Pa @SCRIPT@ . -.It Fl n , -renew +.It Fl n , -rebind Notifies an existing .Nm process running on the .Ar interface -to renew it's lease. +to rebind it's lease. .Nm will not re-configure itself or use any other command line arguments. +.Nm +will timeout the rebind after 30 seconds at which point the lease will be +expired and +.Nm +will enter the discovery state to obtain a new lease. +Use the +.Fl t , -timeout +option to change this. If .Nm is not running, then it starts up as normal. +This option used to be renew, but rebind is more accurate as we need to +broadcast the request instead of unicasting. .It Fl p , -persistent .Nm normally deconfigures the diff --git a/dhcpcd.c b/dhcpcd.c index 15f487dd..dc2082a7 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -67,7 +67,7 @@ static const struct option longopts[] = { {"release", no_argument, NULL, 'k'}, {"leasetime", required_argument, NULL, 'l'}, {"metric", required_argument, NULL, 'm'}, - {"renew", no_argument, NULL, 'n'}, + {"rebind", no_argument, NULL, 'n'}, {"option", required_argument, NULL, 'o'}, {"persistent", no_argument, NULL, 'p'}, {"quiet", no_argument, NULL, 'q'}, @@ -96,6 +96,7 @@ static const struct option longopts[] = { {"version", no_argument, &doversion, 1}, #ifdef CMDLINE_COMPAT {"classid", optional_argument, NULL, 'i'}, + {"renew", no_argument, NULL, 'n'}, {"nohostname", no_argument, NULL, 'H'}, {"nomtu", no_argument, NULL, 'M'}, {"nontp", no_argument, NULL, 'N'},