aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-01-23 17:38:29 +0000
committerBill Nottingham <notting@redhat.com>2007-01-23 17:38:29 +0000
commit1b562d23206b761a0002192d423cf8e9140b061d (patch)
tree717b7ab9d418074b7d91cee3d7a940373931e80f
parent5793ef1bacf4dd831947567904ef971d4e725296 (diff)
downloadinitscripts-1b562d23206b761a0002192d423cf8e9140b061d.tar
initscripts-1b562d23206b761a0002192d423cf8e9140b061d.tar.gz
initscripts-1b562d23206b761a0002192d423cf8e9140b061d.tar.bz2
initscripts-1b562d23206b761a0002192d423cf8e9140b061d.tar.xz
initscripts-1b562d23206b761a0002192d423cf8e9140b061d.zip
simplify bonding test (#215887, <herbert.xu@redhat.com>)
-rw-r--r--sysconfig/network-scripts/network-functions5
1 files changed, 1 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 0342e40b..5791c611 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -398,10 +398,7 @@ install_bonding_driver ()
is_bonding_device ()
{
- [ ! -d "/sys/class/net/$1" ] && return 1
- [ "${TYPE}" = "Bonding" ] && return 0
- ethtool -i $1 2>/dev/null | grep -q "driver: bonding" && return 0
- return 1
+ [ -f "/sys/class/net/$1/bonding/slaves" ]
}
# Invoke this when /etc/resolv.conf has changed: