dhclient-script - DHCP client network configuration script
The DHCP client network configuration script is invoked from time to time by dhclient(8). This script is
used by the dhcp client to set each interface’s initial configuration prior to requesting an address, to test the
address once it has been offered, and to set the interface’s final configuration once a lease has been
acquired. If no lease is acquired, the script is used to test predefined leases, if any, and also called once if
no valid lease can be identified.
This script is not meant to be customized by the end user. If local customizations are needed, they should
be possible using the enter and exit hooks provided (see HOOKS for details). These hooks will allow the
user to override the default behaviour of the client in creating a /etc/resolv.conf file.
No standard client script exists for some operating systems, even though the actual client may work, so a
pioneering user may well need to create a new script or modify an existing one. In general, customizations
specific to a particular computer should be done in the /etc/dhcp3/dhclient.conf file. If you find that you
can’t make such a customization without customizing /etc/dhcp3/dhclient.conf or using the enter and exit
hooks, please submit a bug report.
When it starts, the client script first defines a shell function, make_resolv_conf , which is later used to cre-
ate the /etc/resolv.conf file. To override the default behaviour, redefine this function in the enter hook
On after defining the make_resolv_conf function, the client script checks for the presence of an executable
/etc/dhcp3/dhclient-enter-hooks script, and if present, it invokes the script inline, using the Bourne shell
’.’ command. The entire environment documented under OPERATION is available to this script, which
may modify the environment if needed to change the behaviour of the script.
If an error occurs during the
execution of the script, it can set the exit_st