/libexec/dhcpcd-hooks
and the user defined hooks are
/etc/dhcpcd.enter-hook.
and
/etc/dhcpcd.exit-hook.
The default install supplies hook scripts for configuring
/etc/resolv.conf
and the hostname.
Your distribution may have included other hook scripts to say configure
ntp or ypbind.
A test hook is also supplied that simply echos the dhcp variables to the
console from DISCOVER message.
Each time
dhcpcd-run-hooks
is invoked,
$interface
is set to the interface that
dhcpcd
is run on and
$reason
is to the reason why
dhcpcd-run-hooks
was invoked.
DHCP information to be configured is held in variables starting with the word
new_ and old DHCP information to be removed is held in variables starting with
the word old_.
dhcpcd
can display the full list of variables it knows how about by using the
-V, -variables
argument.
Here's a list of reasons why dhcpcd-run-hooks could be invoked:
PREINITINFORMBOUNDRENEWREBINDREBOOTEXPIREIPV4LLFAILTIMEOUTTEST/etc/dhcpcd.enter-hook
and any scripts found in
/libexec/dhcpcd-hooks
in a lexical order and then finally
/etc/dhcpcd.exit-hook