diff options
author | Shawn Routhier <sar@isc.org> | 2012-11-13 12:56:02 -0800 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2012-11-13 12:56:02 -0800 |
commit | 10613724a97140bc22c2e17f8627dd898c5064ac (patch) | |
tree | b3d3aa208ae581037a3b52922e7d2a15cd32c853 /client/dhclient-script.8 | |
parent | d56788df77ad347ffb0dc459bcfd5e13567abbaa (diff) | |
download | isc-dhcp-10613724a97140bc22c2e17f8627dd898c5064ac.tar.gz |
[master]
The client now passes information about the options it requested
from the server to the script code via environment variables.
These variables are of the form requested_<option_name>=1 with
the option name being the same as used in the new_* and old_*
variables. [ISC-Bugs #29068]
Diffstat (limited to 'client/dhclient-script.8')
-rw-r--r-- | client/dhclient-script.8 | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/client/dhclient-script.8 b/client/dhclient-script.8 index 5606d058..f493e71f 100644 --- a/client/dhclient-script.8 +++ b/client/dhclient-script.8 @@ -1,5 +1,6 @@ .\" dhclient-script.8 .\" +.\" Copyright (c) 2012 by Internet Systems Consortium, Inc. ("ISC") .\" Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC") .\" Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC") .\" Copyright (c) 1996-2003 by Internet Software Consortium @@ -125,7 +126,13 @@ options acquired from the server are passed using the option name described in \fBdhcp-options\fR, except that dashes (\'-\') are replaced by underscores (\'_\') in order to make valid shell variables, and the variable names start with new_. So for example, the new subnet mask -would be passed in $new_subnet_mask. +would be passed in $new_subnet_mask. The options that the client +explicitly requested via a PRL or ORO option are passed with the same +option name as above but prepended with requested_ and with a value of 1, +or example requested_subnet_mask=1. No such variable is defined for +options not requested by the client or options that don't require a +request option, such as the ip address (*_ip_address) or expiration +time (*_expiry). .PP Before actually configuring the address, dhclient-script should somehow ARP for it and exit with a nonzero status if it receives a @@ -152,13 +159,13 @@ address not be used if it is identical to the bound IP address in this case. .SH RENEW When a binding has been renewed, the script is called as in BOUND, -except that in addition to all the variables starting with $new_, -there is another set of variables starting with $old_. Persistent -settings that may have changed need to be deleted - for example, if a -local route to the bound address is being configured, the old local -route should be deleted. If the default route has changed, the old default -route should be deleted. If the static routes have changed, the old -ones should be deleted. Otherwise, processing can be done as with +except that in addition to all the variables starting with $new_, and +$requested_ there is another set of variables starting with $old_. +Persistent settings that may have changed need to be deleted - for +example, if a local route to the bound address is being configured, +the old local route should be deleted. If the default route has changed, +the old default route should be deleted. If the static routes have changed, +the old ones should be deleted. Otherwise, processing can be done as with BOUND. .SH REBIND The DHCP client has rebound to a new DHCP server. This can be handled |