aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/network
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-08-15 20:20:46 +0000
committerBill Nottingham <notting@redhat.com>2001-08-15 20:20:46 +0000
commitf6e1525cde05acf072129a357e02bedcd14d79c9 (patch)
tree9e65e83f3e93892c8e8fca55d7a7350cb657f274 /rc.d/init.d/network
parent4d92a97eb8701ff9c02221f6b490002ed928b08f (diff)
downloadinitscripts-f6e1525cde05acf072129a357e02bedcd14d79c9.tar
initscripts-f6e1525cde05acf072129a357e02bedcd14d79c9.tar.gz
initscripts-f6e1525cde05acf072129a357e02bedcd14d79c9.tar.bz2
initscripts-f6e1525cde05acf072129a357e02bedcd14d79c9.tar.xz
initscripts-f6e1525cde05acf072129a357e02bedcd14d79c9.zip
add is_available() function for network devices; use it. gets rid of horribly ugly modprobe messages
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-xrc.d/init.d/network25
1 files changed, 12 insertions, 13 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 7ab4ec75..009f9bc6 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -40,6 +40,8 @@ fi
CWD=`pwd`
cd /etc/sysconfig/network-scripts
+. network-functions
+
# find all the interfaces besides loopback.
# ignore aliases, alternative configurations, and editor backup files
interfaces=`ls ifcfg* | LANG=C egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \
@@ -76,16 +78,14 @@ case "$1" in
sysctl -w kernel.hotplug="/bin/true" > /dev/null 2>&1
for i in $interfaces; do
- if LANG=C egrep -L "^ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i >/dev/null 2>&1 ; then
- if [ "${i##eth}" != "$i" ]; then
- # Probe module to preserve interface ordering
- if [ -n "`modprobe -vn $i | grep -v Note:`" ]; then
- /sbin/ifconfig $i >/dev/null 2>&1
- fi
- fi
- else
- # If we're in confirmation mode, get user confirmation
- [ -n "$CONFIRM" ] &&
+ if [ "${i##eth}" != "$i" ] && ! is_available $i ; then
+ continue
+ fi
+ if LANG=C egrep -L "^ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i > /dev/null ; then
+ continue
+ fi
+ # If we're in confirmation mode, get user confirmation
+ [ -n "$CONFIRM" ] &&
{
confirm $i
case $? in
@@ -99,10 +99,9 @@ case "$1" in
continue
;;
esac
- }
+ }
- action $"Bringing up interface $i: " ./ifup $i boot
- fi
+ action $"Bringing up interface $i: " ./ifup $i boot
done
# add cipe here.