From 05b75af9bf59f2be08a7a8653b68aa5dc4e1efba Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 10 Apr 2000 14:55:52 +0000 Subject: don't bring up commented out 'ONBOOT' interfaces ; don't shut down inactive interfaces --- rc.d/init.d/network | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rc.d/init.d') diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 8f486277..ffd49236 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -58,7 +58,7 @@ case "$1" in esac for i in $interfaces; do - if egrep -L "ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i >/dev/null ; then + if egrep -L "ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i | grep -v "^#" >/dev/null ; then # Probe module to preserve interface ordering /sbin/ifconfig $i >/dev/null 2>&1 else @@ -90,7 +90,9 @@ case "$1" in fi for i in $interfaces ; do - action "Shutting down interface $i" ./ifdown $i boot + if ifconfig $i | grep -q "UP" >/dev/null 2>&1 ; then + action "Shutting down interface $i" ./ifdown $i boot + fi done case "$IPX" in yes|true) -- cgit v1.2.1