From 92a2195e5f56a8283fe7187a49b67ef81c082b65 Mon Sep 17 00:00:00 2001 From: "Michael K. Johnson" Date: Tue, 16 Sep 1997 21:46:01 +0000 Subject: General cleanup. Don't start devices that shouldn't be started. --- rc.d/init.d/network | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'rc.d') diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 09ccc604..150fa3d7 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -23,15 +23,15 @@ if [ -d /proc/sys/net/ipv4 ]; then # people could have left this out of their kernel, which isn't # exactly an error if [ ! -f /proc/sys/net/ipv4/ip_forward ] ; then - echo "/proc/sys/net/ipv4/ip_forward is missing -- cannot control IP " \ - "forwarding" >&2 + echo "/proc/sys/net/ipv4/ip_forward is missing --" \ + "cannot control IP forwarding" >&2 else if [ "$FORWARD_IPV4" = "no" -o "$FORWARD_IPV4" = "false" ]; then value=0 echo "Disabling IPv4 packet forwarding." else - echo "Enabling IPv4 packet forwarding." value=1 + echo "Enabling IPv4 packet forwarding." fi echo "$value" > /proc/sys/net/ipv4/ip_forward @@ -41,11 +41,13 @@ fi # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 -[ -f /sbin/ifconfig ] || exit 0 +[ -x /sbin/ifconfig ] || exit 0 cd /etc/sysconfig/network-scripts -interfaces=`ls ifcfg* | grep -v ifcfg-lo | grep -v :` +# find all the interfaces besides loopback. +# ignore aliases, alternative configurations, and editor backup files +interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$'` # See how we were called. case "$1" in -- cgit v1.2.1