aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2002-06-27 18:37:22 +0000
committerBill Nottingham <notting@redhat.com>2002-06-27 18:37:22 +0000
commit96a8374a35cae5e4f25f306637e0e80ce2d3019f (patch)
tree10ab8e83ff4caa987a767df12d2614b41157fbac /sysconfig
parent944d2e72c714606f2ea52a99f0d49ab98a8bbd83 (diff)
downloadinitscripts-96a8374a35cae5e4f25f306637e0e80ce2d3019f.tar
initscripts-96a8374a35cae5e4f25f306637e0e80ce2d3019f.tar.gz
initscripts-96a8374a35cae5e4f25f306637e0e80ce2d3019f.tar.bz2
initscripts-96a8374a35cae5e4f25f306637e0e80ce2d3019f.tar.xz
initscripts-96a8374a35cae5e4f25f306637e0e80ce2d3019f.zip
switch this back; we don't want to report non-existent aliases as up
Diffstat (limited to 'sysconfig')
-rw-r--r--sysconfig/network-scripts/network-functions19
1 files changed, 11 insertions, 8 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 42384882..30665628 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -121,15 +121,18 @@ set_hostname()
check_device_down ()
{
- # never say alias devices are down
- if echo $1 | grep -q ':'; then
+ if echo $1 | grep -q ':' ; then
+ if LC_ALL=C ifconfig -a 2>/dev/null | grep -q $1 ; then
+ return 1
+ else
+ return 0
+ fi
+ else
+ if LC_ALL=C ip -o link ls dev $1 2>/dev/null | grep ",UP" >/dev/null 2>&1 ; then
return 1
- fi
-
- if LC_ALL=C ip -o link ls dev $1 2>/dev/null | grep -q UP ; then
- return 1
- else
+ else
return 0
+ fi
fi
}
@@ -137,7 +140,7 @@ check_link_down ()
{
if [ -x /sbin/mii-tool ]; then
LC_ALL=C ip link show $1 2>/dev/null| grep -q UP || ip link set $1 up >/dev/null 2>&1
- # wait for link to come up
+ # wait for link to come up
sleep 2
/sbin/mii-tool >/dev/null 2>&1 || return 1
output=`LC_ALL=C /sbin/mii-tool $1 2>&1`