From 8bcc6dbeb644ff182706ec341bda4771e7166672 Mon Sep 17 00:00:00 2001 From: Preston Brown Date: Tue, 25 Sep 2001 18:48:06 +0000 Subject: need_hostname now returns true or false, doesn't set NEEDHOSTNAME. Some reformatting fixes. --- sysconfig/network-scripts/network-functions | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sysconfig/network-scripts/network-functions') 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} -- cgit v1.2.1