aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-01-31 20:30:27 +0000
committerBill Nottingham <notting@redhat.com>2000-01-31 20:30:27 +0000
commit2f8d6dfcd54c7af0163fb3ca849f1d543f977b73 (patch)
tree94b091ac9d85c37ce7e2b99d2d4c5b6972e5a365
parent8444e6f477ed933425d3f6e832840f90a3c98b05 (diff)
downloadinitscripts-r4-85.tar
initscripts-r4-85.tar.gz
initscripts-r4-85.tar.bz2
initscripts-r4-85.tar.xz
initscripts-r4-85.zip
bring down *all* interfaces on network stopr4-85
-rwxr-xr-xrc.d/init.d/network12
-rwxr-xr-xsysconfig/network-scripts/ifup11
2 files changed, 11 insertions, 12 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 6dbeb116..4757fe45 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -38,7 +38,7 @@ interfaces=`ls ifcfg* | egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$' | \
sed 's/^ifcfg-//g'`
interfaces_boot=
-for inter in interfaces ; do
+for inter in $interfaces ; do
egrep -L "ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$inter >/dev/null || interfaces_boot="$interfaces_boot $inter"
done
@@ -59,12 +59,10 @@ case "$1" in
esac
for i in $interfaces; do
- if $i in $interfaces_boot ; then
- action "Bringing up interface $i" ./ifup $i boot
- else
- # Do this so the module loads, so the interface
- # gets registered
+ if egrep -L "ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i >/dev/null ; then
./ifup $i boot
+ else
+ action "Bringing up interface $i" ./ifup $i boot
fi
done
@@ -78,7 +76,7 @@ case "$1" in
touch /var/lock/subsys/network
;;
stop)
- for i in $interfaces_boot; do
+ for i in $interfaces ; do
action "Shutting down interface $i" ./ifdown $i boot
done
case "$IPX" in
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 116a4e5f..8e37de6b 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -31,11 +31,6 @@ fi
source_config
-if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ]
-then
- exit
-fi
-
IPSETUP=no
DEVICETYPE=`echo $DEVICE | sed "s/[0-9]*$//"`
@@ -55,6 +50,12 @@ if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
PUMP=true
fi
+if [ "$2" = "boot" -a "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ]; then
+ # Probe module to preserve interface ordering.
+ /sbin/ifconfig ${REALDEVICE} >/dev/null 2>&1
+ exit
+fi
+
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-${DEVICETYPE}"
if [ -x $OTHERSCRIPT ]; then