diff options
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 0342e40b..9ef2134c 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -391,17 +391,14 @@ is_wireless_device () install_bonding_driver () { ethtool -i $1 2>/dev/null | grep -q "driver: bonding" && return 0 - [ ! -f /sys/class/net/bonding_masters ] && modprobe bonding || return 1 + [ ! -f /sys/class/net/bonding_masters ] && ( modprobe bonding || return 1 ) echo "+$1" > /sys/class/net/bonding_masters return 0 } 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: |