aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThan Ngo <than@redhat.com>2000-10-31 17:35:17 +0000
committerThan Ngo <than@redhat.com>2000-10-31 17:35:17 +0000
commitf951740b42b7112eff0cf677174638a34d7787d4 (patch)
tree03b10756566fe8234e9a9edf53ccf9f8a8f81d4a
parentef5c4d8f0c2a3251baad0f80a7fd283a82bb72b5 (diff)
downloadinitscripts-f951740b42b7112eff0cf677174638a34d7787d4.tar
initscripts-f951740b42b7112eff0cf677174638a34d7787d4.tar.gz
initscripts-f951740b42b7112eff0cf677174638a34d7787d4.tar.bz2
initscripts-f951740b42b7112eff0cf677174638a34d7787d4.tar.xz
initscripts-f951740b42b7112eff0cf677174638a34d7787d4.zip
fix the adding default route if GATEWAY" = "0.0.0.0
-rw-r--r--ChangeLog4
-rw-r--r--initscripts.spec3
-rw-r--r--sysconfig/network-scripts/network-functions6
3 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3cbcea6f..6213fc73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-10-31 Than Ngo <than@redhat.com>
+ * initscripts.spec, sysconfig/network-scripts/network-functions
+ fix the adding default route if GATEWAY" = "0.0.0.0"
+
2000-10-10 Nalin Dahyabhai <nalin@redhat.com>
* initscripts.spec, src/usernetctl.c:
diff --git a/initscripts.spec b/initscripts.spec
index fab5103e..b6b95a5a 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -229,6 +229,9 @@ rm -rf $RPM_BUILD_ROOT
%ghost %attr(0664,root,utmp) /var/run/utmp
%changelog
+* Tue Oct 31 2000 Than Ngo <than@redhat.com>
+- fix the adding default route if GATEWAY=0.0.0.0
+
* Tue Oct 10 2000 Nalin Dahyabhai <nalin@redhat.com>
- handle "gw x.x.x.x" as the last pair of flags in ifup-routes (#18804)
- fix top-level makefile install target
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index d4459a56..8b726a83 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -84,7 +84,11 @@ add_default_route ()
find_gateway_dev
if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" -a "${GATEWAYDEV}" != "" ] ; then
if ! check_device_down ; then
- /sbin/route add default gw ${GATEWAY} ${GATEWAYDEV}
+ if [ "$GATEWAY" = "0.0.0.0" ]; then
+ /sbin/route add default ${GATEWAYDEV}
+ else
+ /sbin/route add default gw ${GATEWAY} ${GATEWAYDEV}
+ fi
fi
fi
}