Dynamic host configuration protocol software
.gitignore | ||
11-dhclient | ||
12-dhcpd | ||
56dhclient | ||
dhclient-script | ||
dhcp-4.2.0-add_timeout_when_NULL.patch | ||
dhcp-4.2.0-CLOEXEC.patch | ||
dhcp-4.2.0-default-requested-options.patch | ||
dhcp-4.2.0-dhclient-decline-backoff.patch | ||
dhcp-4.2.0-errwarn-message.patch | ||
dhcp-4.2.0-garbage-chars.patch | ||
dhcp-4.2.0-honor-expired.patch | ||
dhcp-4.2.0-inherit-leases.patch | ||
dhcp-4.2.0-logpid.patch | ||
dhcp-4.2.0-missing-ipv6-not-fatal.patch | ||
dhcp-4.2.0-noprefixavail.patch | ||
dhcp-4.2.0-paths.patch | ||
dhcp-4.2.0-PPP.patch | ||
dhcp-4.2.0-release-by-ifup.patch | ||
dhcp-4.2.0-unicast-bootp.patch | ||
dhcp-4.2.0-UseMulticast.patch | ||
dhcp-4.2.1-64_bit_lease_parse.patch | ||
dhcp-4.2.1-invalid-dhclient-conf.patch | ||
dhcp-4.2.1-manpages.patch | ||
dhcp-4.2.1-P1-CVE-2011-0997.patch | ||
dhcp-4.2.1-retransmission.patch | ||
dhcp-4.2.1-sendDecline.patch | ||
dhcp-4.2.2-capability.patch | ||
dhcp-4.2.2-CLOEXEC.patch | ||
dhcp-4.2.2-dhclient-usage.patch | ||
dhcp-4.2.2-gpxe-cid.patch | ||
dhcp-4.2.2-improved-xid.patch | ||
dhcp-4.2.2-lpf-ib.patch | ||
dhcp-4.2.2-remove-bind.patch | ||
dhcp-4.2.2-sharedlib.patch | ||
dhcp-4.2.2-systemtap.patch | ||
dhcp-4.2.2-xen-checksum.patch | ||
dhcp-4.2.3-options.patch | ||
dhcp-4.2.3-rfc3442-classless-static-routes.patch | ||
dhcp.spec | ||
dhcpd6.init | ||
dhcpd6.service | ||
dhcpd.init | ||
dhcpd.service | ||
dhcrelay.init | ||
dhcrelay.service | ||
README.dhclient.d | ||
sources | ||
tap_all.stp | ||
test.sh |
The /etc/dhcp/dhclient.d directory allows other packages and system administrators to create application-specific option handlers for dhclient. When dhclient is run, any option listed in the dhcp-options(5) man page can be requested. dhclient-script does not handle every option available because doing so would make the script unmaintainable as the components using those options might change over time. The knowledge of how to handle those options should be under the responsibility of the package maintainer for that component (e.g., NTP options belong in a handler in the ntp package). To make maintenance easier, application specific DHCP options can be handled by creating a script with two functions and placing it in /etc/dhcp/dhclient.d The script must follow a specific form: (1) The script must be named NAME.sh. NAME can be anything, but it makes sense to name it for the service it handles. e.g., ntp.sh (2) The script must provide a NAME_config() function to read the options and do whatever it takes to put those options in place. (3) The script must provide a NAME_restore() function to restore original configuration state when dhclient stops. (4) The script must be 'chmod +x' or dhclient-script will ignore it. The scripts execute in the same environment as dhclient-script. That means all of the functions and variables available to it are available to your NAME.sh script. Things of note: ${SAVEDIR} is where original configuration files are saved. Save your original configuration files here before you take the DHCP provided values and generate new files. Variables set in /etc/sysconfig/network, /etc/sysconfig/networking/network, and /etc/sysconfig/network-scripts/ifcfg-$interface are available to you. See the scripts in /etc/dhcp/dhclient.d for examples. NOTE: Do not use functions defined in /sbin/dhclient-script. Consider dhclient-script a black box. This script may change over time, so the dhclient.d scripts should not be using functions defined in it. -- David Cantrell <dcantrell@redhat.com>