Part of the new replacement for dhclient-script is /lib/rcscripts/net.modules.d/helpers.d/dhclient-udhcpc-wrapper. It includes a call to dhclient-exit-hooks, but doesn't have the corresponding call to dhclient-enter-hooks. This is a handy thing to have (well, I need it, anyway). The call should come right before the call to the dhclient script in dhclient-udhcpc-wrapper, as follows: [[ -e /etc/dhcp/dhclient-enter-hooks ]] \ && (. /etc/dhcp/dhclient-enter-hooks) # Execute the dhclient script and exit with its code /lib/rcscripts/net.modules.d/helpers.d/udhcpc-${iface_type} ${action} . . . etc.
As I understand it, you don't need enter-hooks unless you wish to modify the dhcp configuration process. As you probably aren't wanting to modify the configuration process but you want to add to the process then you want to use exit-hooks. If you need enter-hooks, could you please state why?
As you said, dhclient-enter-hooks is nice because it allows you to do configuration with the ip, netmask, etc. before the interface is brought up. I admit, it's kind of an edge condition, but it can be very handy. Here's how I'm using it: I have a server A running dhcpd which is listening on eth1. Eth0 is using dhclient; eth1 is a static address (192.168.1.1). For debugging purposes, I plug another, identical, server B into A's lan. Now B's eth0 is given an address by A's dhcpd - let's say it is 192.168.1.254. But B's eth1 is still 192.168.1.1. So now we have a conflict. Rather than have our developers manually configure this each time, we have an enter-hooks script that reconfigures B's eth1 so it won't conflict with eth0. It won't work in exit-hooks, because eth0 will fail to come up because of the conflict. Anyway, the end result is that plugging one server into another magically "just works" because the ip range collision is detected and fixed. It's very convenient for us in testing. The other reason to include a spot for enter-hooks is that the original dhclient-script has it, so removing it amounts to feature reduction ;)
Created attachment 76223 [details, diff] dhclient-enter-hooks for baselayout-1.11 Will appear in baselayout-1.11.15
Created attachment 76224 [details, diff] dhclient-enter-hooks for baselayout-1.12 Will be in baselayout-1.12.0_pre14
Patches applied to our svn repo
baselayout-1.12.0_pre14 is out