prefer isc-dhcp on freebsd

This commit is contained in:
Jörg Thalheim 2015-02-14 11:22:39 +01:00
parent c4039d5191
commit 022ea31874
1 changed files with 7 additions and 1 deletions

View File

@ -75,7 +75,13 @@ start_dhclient() {
dhclient -x
dhclient -nw "$interface"
elif [[ "$OSTYPE" == "freebsd"* ]]; then
dhclient -b "$interface"
# prefer isc-dhcp-client as it supports dhcpv6
if [[ -x /usr/local/sbin/dhclient ]]; then
/usr/local/sbin/dhclient -x
/usr/local/sbin/dhclient -nw "$interface"
else
dhclient -b "$interface"
fi
else
nohup setsid dhclient "$interface" >/dev/null 2>&1
fi