With a bit of coercing I managed to upgrade my firewall from 7.2-stable to 8. I have only one problem though. On 7.2-stable I used a /etc/dhclient-enter-hooks script to add two special routes after the lease was acquired. Unfortunately the 8 dhclient doesn't seem to support this anymore.
After looking through the dhclient and dhclient.conf man pages I did see an option "script" I might be able to use.
However, I can't find any info on how to actually use this. I need to set something after the lease has been obtained.
For reference, here's my old 7-stable dhclient-enter-hooks:
Anybody have any info on how to do this with the version of dhclient from freebsd-8?
After looking through the dhclient and dhclient.conf man pages I did see an option "script" I might be able to use.
script "script-name";
The script statement is used to specify the pathname of the DHCP client configuration script. 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. For more information, see dhclient.leases(5).
However, I can't find any info on how to actually use this. I need to set something after the lease has been obtained.
For reference, here's my old 7-stable dhclient-enter-hooks:
Code:
add_new_resolv_conf() {
# We don't want /etc/resolv.conf changed
# So this is an empty function
return 0
}
add_new_routes() {
route add -net 10.0.0.138 -iface $new_ip_address -cloning
route add default 10.0.0.138
}
Anybody have any info on how to do this with the version of dhclient from freebsd-8?