- Honor DEFROUTE=yes|no for all connection types (#530209)

This commit is contained in:
Jiří Popelka 2009-11-23 09:14:24 +00:00
parent 9726e0ff9f
commit 9ca442a1dd
2 changed files with 37 additions and 34 deletions

View File

@ -272,11 +272,12 @@ dhconfig() {
. ${ETCDIR}/dhclient-up-hooks . ${ETCDIR}/dhclient-up-hooks
fi fi
if [[ (( -z "${GATEWAYDEV}" ) || if [[ ( "${DEFROUTE}" != "no") &&
( "${GATEWAYDEV}" = "${interface}" )) && (( -z "${GATEWAYDEV}" ) ||
(( -z "$GATEWAY" ) || ( "${GATEWAYDEV}" = "${interface}" )) ]]; then
if [[ ( -z "$GATEWAY" ) ||
(( -n "$DHCLIENT_IGNORE_GATEWAY" ) && (( -n "$DHCLIENT_IGNORE_GATEWAY" ) &&
( "$DHCLIENT_IGNORE_GATEWAY" = [Yy]* ))) ]]; then ( "$DHCLIENT_IGNORE_GATEWAY" = [Yy]* )) ]]; then
metric="${METRIC:-}" metric="${METRIC:-}"
let i="${METRIC:-0}" let i="${METRIC:-0}"
default_routers=() default_routers=()
@ -303,9 +304,7 @@ dhconfig() {
let i=i+1 let i=i+1
metric=${i} metric=${i}
done done
elif [[ (( -z "${GATEWAYDEV}" ) || elif [ -n "${GATEWAY}" ]; then
( "${GATEWAYDEV}" = "${interface}" )) &&
( -n "${GATEWAY}" ) ]]; then
routersubnet=$(mask ${GATEWAY} ${new_subnet_mask}) routersubnet=$(mask ${GATEWAY} ${new_subnet_mask})
mysubnet=$(mask ${new_ip_address} ${new_subnet_mask}) mysubnet=$(mask ${new_ip_address} ${new_subnet_mask})
@ -313,6 +312,7 @@ dhconfig() {
ip route replace default via ${GATEWAY} dev ${interface} ip route replace default via ${GATEWAY} dev ${interface}
fi fi
fi fi
fi
# static routes # static routes
if [ -n "${new_static_routes}" ]; then if [ -n "${new_static_routes}" ]; then

View File

@ -13,7 +13,7 @@
Summary: Dynamic host configuration protocol software Summary: Dynamic host configuration protocol software
Name: dhcp Name: dhcp
Version: %{basever}p1 Version: %{basever}p1
Release: 13%{?dist} Release: 14%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and # dcantrell maintaining the package) made incorrect use of the epoch and
# that's why it is at 12 now. It should have never been used, but it was. # that's why it is at 12 now. It should have never been used, but it was.
@ -481,6 +481,9 @@ fi
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
%changelog %changelog
* Mon Nov 23 2009 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.0p1-14
- Honor DEFROUTE=yes|no for all connection types (#530209)
* Fri Oct 30 2009 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.0p1-13 * Fri Oct 30 2009 Jiri Popelka <jpopelka@redhat.com> - 12:4.1.0p1-13
- Make dhclient-script add IPv6 address to interface (#531997) - Make dhclient-script add IPv6 address to interface (#531997)