mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-05 08:45:35 +00:00
Client Script fixes
[ISC-Bugs #23045] Typos in client/scripts/openbsd [ISC-Bugs #23565] In the client scripts add a zone id (interface id) if the domain search address is link local. [ISC-Bugs #1277] In some of the client scripts add code to handle the case of the default router information being changed without the address being changed.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id: freebsd,v 1.23 2009/04/21 14:09:57 pselkirk Exp $
|
||||
# $Id: freebsd,v 1.24 2011/05/18 19:55:44 sar Exp $
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
@@ -59,7 +59,14 @@ make_resolv_conf() {
|
||||
if [ $exit_status -ne 0 ] ; then
|
||||
break
|
||||
fi
|
||||
( echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 )
|
||||
# If the nameserver has a link-local address
|
||||
# add a <zone_id> (interface name) to it.
|
||||
case $nameserver in
|
||||
fe80:*) zone_id="%$interface";;
|
||||
FE80:*) zone_id="%$interface";;
|
||||
*) zone_id='';;
|
||||
esac
|
||||
( echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 )
|
||||
exit_status=$?
|
||||
done
|
||||
|
||||
@@ -208,6 +215,25 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
|
||||
shift; shift
|
||||
done
|
||||
fi
|
||||
else
|
||||
# we haven't changed the address, have we changed other options
|
||||
# that we wish to update?
|
||||
if [ x$new_routers != x ] && [ x$new_routers != x$old_routers ] ; then
|
||||
# if we've changed routers delete the old and add the new.
|
||||
$LOGGER "New Routers: $new_routers"
|
||||
for router in $old_routers; do
|
||||
route delete default $router >/dev/null 2>&1
|
||||
done
|
||||
for router in $new_routers; do
|
||||
# If the subnet is captive, eg the netmask is /32 but the default
|
||||
# gateway is (obviously) outside of this, then we need to produce a
|
||||
# host route to reach the gateway.
|
||||
if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
|
||||
route add -host $router -interface $interface
|
||||
fi
|
||||
route add default $router >/dev/null 2>&1
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
|
||||
then
|
||||
|
Reference in New Issue
Block a user