mirror of
https://git.freebsd.org/ports.git
synced 2025-06-06 05:10:29 -04:00
isc-dhcp3-client/pkg-message updated isc-dhcp3-devel/pkg-plist updated from PR#61620 isc-dhcp3-relay/pkg-message rewritten to reflect rcNG change isc-dhcp3-relay/pkg-plist etc/rc.isc-dhcrelay.conf deleted etc/rc.d/isc-dhcrelay.sh.sample renamed to etc/rc.d/isc-dhcrelay.sh isc-dhcp3-server/Makefile PORTREVISION bumped USE_RC_SUBR added *_SUB added pre-everything added (WITHOUT_INTERFACE_POLLING cond added) patch-scripts and patch-pkgmessage (! -devel cond) updated patch-site-conf and patch-rc-scripts added install-startup-files now install etc/rc.d/isc-dhcpd.sh instead of etc/rc.d/isc-dhcpd.sh.sample display-message updated (! -devel cond) isc-dhcp3-server/pkg-message rewritten to reflect rcNG change isc-dhcp3-server/pkg-plist etc/rc.isc-dhcpd.conf deleted etc/rc.d/isc-dhcpd.sh.sample renamed to etc/rc.d/isc-dhcpd.sh isc-dhcp3-server/files/isc-dhcpd.sh.sample isc-dhcp3-server/files/isc-dhcrelay.sh.sample both converted to rcNG isc-dhcp3-server/files/patch-freebsd synced w/ -current isc-dhcp3-server/files/patch-site.conf CLIENT_PATH added CFLAGS synced w/ -current isc-dhcp3-server/patch-client::clparse.c isc-dhcp3-server/patch-client::dhclient.8 new files synced w/ -current isc-dhcp3-server/patch-client::dhclient.c new file synced w/ -current (-DENABLE_POLLING_MODE) isc-dhcp3-server/patch-client::dhclient.conf new file isc-dhcp3-server/patch-common::dhcp-options.5 new file synced w/ -current isc-dhcp3-server/patch-common::discover.c new file from PR#61011 isc-dhcp3-server/patch-common::dispatch.c new file synced w/ -current (-DENABLE_POLLING_MODE) isc-dhcp3-server/files/patch-common::parse.c fix time_t issues on little-endian 64-bit platforms isc-dhcp3-server/patch-dst::Makefile.dist new file from PR#61620 isc-dhcp3-server/patch-includes::cf::freebsd.h new file synced w/ -current (-DRESCUE unused right now) isc-dhcp3-server/patch-includes::dhcpd.h new file synced w/ -current (-DENABLE_POLLING_MODE) isc-dhcp3-server/files/rc.isc-dhcpd.conf.sample isc-dhcp3-server/files/rc.isc-dhcrelay.conf.sample deleted files PR: 57943, 61011, 61620 Submitted by: sec@42.org, andy@fud.org.nz, kaa@in-line.ru, des, ru
75 lines
2.4 KiB
Text
75 lines
2.4 KiB
Text
--- client/scripts/freebsd.orig Sun Apr 27 21:44:01 2003
|
|
+++ client/scripts/freebsd Wed Mar 3 02:28:29 2004
|
|
@@ -16,7 +16,7 @@
|
|
( echo search $new_domain_name >/etc/resolv.conf )
|
|
exit_status=$?
|
|
else
|
|
- rm /etc/resolv.conf
|
|
+ ( rm /etc/resolv.conf )
|
|
exit_status=$?
|
|
fi
|
|
if [ $exit_status -ne 0 ]; then
|
|
@@ -32,17 +32,17 @@
|
|
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
|
exit_with_hooks() {
|
|
exit_status=$1
|
|
- if [ -f /etc/dhclient-exit-hooks ]; then
|
|
- . /etc/dhclient-exit-hooks
|
|
+ if [ -f %%PREFIX%%/etc/dhclient-exit-hooks ]; then
|
|
+ . %%PREFIX%%/etc/dhclient-exit-hooks
|
|
fi
|
|
# probably should do something with exit status of the local script
|
|
exit $exit_status
|
|
}
|
|
|
|
# Invoke the local dhcp client enter hooks, if they exist.
|
|
-if [ -f /etc/dhclient-enter-hooks ]; then
|
|
+if [ -f %%PREFIX%%/etc/dhclient-enter-hooks ]; then
|
|
exit_status=0
|
|
- . /etc/dhclient-enter-hooks
|
|
+ . %%PREFIX%%/etc/dhclient-enter-hooks
|
|
# allow the local script to abort processing of this state
|
|
# local script must set exit_status variable to nonzero.
|
|
if [ $exit_status -ne 0 ]; then
|
|
@@ -51,11 +51,11 @@
|
|
fi
|
|
|
|
if [ x$new_network_number != x ]; then
|
|
- $LOGGER New Network Number: $new_network_number
|
|
+ $LOGGER "New Network Number: $new_network_number"
|
|
fi
|
|
|
|
if [ x$new_broadcast_address != x ]; then
|
|
- $LOGGER New Broadcast Address: $new_broadcast_address
|
|
+ $LOGGER "New Broadcast Address: $new_broadcast_address"
|
|
new_broadcast_arg="broadcast $new_broadcast_address"
|
|
fi
|
|
if [ x$old_broadcast_address != x ]; then
|
|
@@ -71,6 +71,15 @@
|
|
alias_subnet_arg="netmask $alias_subnet_mask"
|
|
fi
|
|
|
|
+# Get the interface to which our default route is bound to.
|
|
+if [ -x /usr/bin/netstat ]; then
|
|
+ if_defaultroute=`/usr/bin/netstat -rn \
|
|
+ | /usr/bin/grep "^default" \
|
|
+ | /usr/bin/awk '{print $6}'`
|
|
+else
|
|
+ if_defaultroute=""
|
|
+fi
|
|
+
|
|
if [ x$reason = xMEDIUM ]; then
|
|
eval "ifconfig $interface $medium"
|
|
eval "ifconfig $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1
|
|
@@ -113,7 +122,10 @@
|
|
eval "ifconfig $interface inet -alias $old_ip_address $medium"
|
|
route delete $old_ip_address 127.1 >/dev/null 2>&1
|
|
for router in $old_routers; do
|
|
- route delete default $router >/dev/null 2>&1
|
|
+ if [ x$if_defaultroute = x ] || [ x$if_defaultroute = x$interface ]
|
|
+ then
|
|
+ route delete default $router >/dev/null 2>&1
|
|
+ fi
|
|
done
|
|
if [ -n "$old_static_routes" ]; then
|
|
set -- $old_static_routes
|