diff options
| author | Bill Nottingham <notting@redhat.com> | 2003-09-04 03:16:19 +0000 | 
|---|---|---|
| committer | Bill Nottingham <notting@redhat.com> | 2003-09-04 03:16:19 +0000 | 
| commit | 5e9dd516e2e0b1634114a9df4c0dd297c140116f (patch) | |
| tree | d0259187ab4f41de315cda22140d35e9fc756bac /rc.d/init.d/network | |
| parent | b70b029e71dd36de95b8d424e68f96efec7eb408 (diff) | |
| download | initscripts-5e9dd516e2e0.tar initscripts-5e9dd516e2e0.tar.gz initscripts-5e9dd516e2e0.tar.bz2 initscripts-5e9dd516e2e0.tar.xz initscripts-5e9dd516e2e0.zip | |
add bonding & xDSL to the list of devices brought up afterwards (#97030,#91399)
and bring them down first (#103042)
Diffstat (limited to 'rc.d/init.d/network')
| -rwxr-xr-x | rc.d/init.d/network | 51 | 
1 files changed, 48 insertions, 3 deletions
| diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 0c0e2894..612238ce 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -96,17 +96,29 @@ case "$1" in  	    awk '{ print $3 }' 2>/dev/null`  	sysctl -w kernel.hotplug="/bin/true" > /dev/null 2>&1 -        cipeinterfaces="" +	cipeinterfaces="" +	bondinterfaces="" +	xdslinterfaces=""  	# bring up all other interfaces configured to come up at boot time  	for i in $interfaces; do  		eval $(LANG=C fgrep "DEVICE=" ifcfg-$i) +		eval $(LANG=C fgrep "TYPE=" ifcfg-$i)  		if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi  		if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then  			cipeinterfaces="$cipeinterfaces $DEVICE"  			continue  		fi +		if [ "${DEVICE##bond}" != "$DEVICE" ] ; then +			bondinterfaces="$bondinterfaces $DEVICE" +			continue +		fi +		if [ "$TYPE" = "xDSL" ]; then +		        xdslinterfaces="$xdslinterfaces $DEVICE" +			continue +		fi +		  		if LANG=C egrep -L "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then  		        # this loads the module, to preserve ordering  			is_available $i @@ -120,8 +132,8 @@ case "$1" in  		action $"Bringing up interface $i: " ./ifup $i boot  	done -	# Bring up CIPE VPN interfaces -	for i in $cipeinterfaces ; do  +	# Bring up xDSL, CIPE, and bonding interfaces +	for i in $xdslinterfaces $cipeinterfaces $bondinterfaces ; do               if ! LANG=C egrep -L "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then  		# If we're in confirmation mode, get user confirmation.  		if [ -f /var/run/confirm ]; then @@ -172,6 +184,39 @@ case "$1" in   		fi   	fi +	cipeinterfaces="" +	bondinterfaces="" +	xdslinterfaces="" + +	# get list of bonding, cipe, and xdsl interfaces +	for i in $interfaces; do +		eval $(LANG=C fgrep "DEVICE=" ifcfg-$i) +		eval $(LANG=C fgrep "TYPE=" ifcfg-$i) +		if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi + +		if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then +			cipeinterfaces="$cipeinterfaces $DEVICE" +			continue +		fi +		if [ "${DEVICE##bond}" != "$DEVICE" ] ; then +			bondinterfaces="$bondinterfaces $DEVICE" +			continue +		fi +		if [ "$TYPE" = "xDSL" ]; then +		        xdslinterfaces="$xdslinterfaces $DEVICE" +			continue +		fi +	done +	 +	for i in $bondinterfaces $cipeinterfaces $xdslinterfaces ; do +		eval $(fgrep "DEVICE=" ifcfg-$i) +		if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi + +		if ! check_device_down $i; then +		   action $"Shutting down interface $i: " ./ifdown $i boot +		fi +	done +	  	# shut down all interfaces (other than loopback)  	for i in $interfaces ; do  		eval $(fgrep "DEVICE=" ifcfg-$i) | 
