aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorPreston Brown <pbrown@redhat.com>2001-09-25 18:48:06 +0000
committerPreston Brown <pbrown@redhat.com>2001-09-25 18:48:06 +0000
commit8bcc6dbeb644ff182706ec341bda4771e7166672 (patch)
treef586ed3c6f25e303bf473f3424a1afb65b6b3edc /sysconfig/network-scripts/network-functions
parent779670cae04691237a793e7a19f19fd3c2b797d3 (diff)
downloadinitscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.tar
initscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.tar.gz
initscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.tar.bz2
initscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.tar.xz
initscripts-8bcc6dbeb644ff182706ec341bda4771e7166672.zip
need_hostname now returns true or false, doesn't set NEEDHOSTNAME. Some reformatting fixes.
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 991b5370..2793fa08 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -100,9 +100,9 @@ need_hostname()
{
if [ "`hostname`" = "(none)" -o "`hostname`" = "localhost" -o \
"`hostname`" = "localhost.localdomain" ]; then
- NEEDHOSTNAME=yes
+ return 0
else
- unset NEEDHOSTNAME
+ return 1
fi
}
@@ -179,7 +179,9 @@ add_default_route ()
{
. /etc/sysconfig/network
find_gateway_dev
- if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" -a "${GATEWAYDEV}" != "" ] ; then
+ if [ "${GATEWAY}" != "" -a
+ "${GATEWAY}" != "none" -a
+ "${GATEWAYDEV}" != "" ] ; then
if ! check_device_down $1; then
if [ "$GATEWAY" = "0.0.0.0" ]; then
/sbin/ip route add default dev ${GATEWAYDEV}