diff options
author | Bill Nottingham <notting@redhat.com> | 2006-10-18 20:52:02 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2006-10-18 20:52:02 +0000 |
commit | ee8269c53d600cc20dfb90d4c061ca61559e10ac (patch) | |
tree | 75dd43fc57222a2550719096d4740a41caa2ac23 /sysconfig/network-scripts/network-functions | |
parent | 29ab1c774b9b615c3d5c6f8cd801a2d6fa531d78 (diff) | |
download | initscripts-ee8269c53d600cc20dfb90d4c061ca61559e10ac.tar initscripts-ee8269c53d600cc20dfb90d4c061ca61559e10ac.tar.gz initscripts-ee8269c53d600cc20dfb90d4c061ca61559e10ac.tar.bz2 initscripts-ee8269c53d600cc20dfb90d4c061ca61559e10ac.tar.xz initscripts-ee8269c53d600cc20dfb90d4c061ca61559e10ac.zip |
use sysfs interface for bonding (#202443, <agospoda@redhat.com>)
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 5e1fa2a5..3fe8b73f 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -240,6 +240,11 @@ END { fi rename_device "$1" "$HWADDR" "$curdev" fi + + if [ ${alias} == "bonding" ]; then + install_bonding_driver $1 + fi + LC_ALL= LANG= ip -o link | grep -q $1 return $? } @@ -383,6 +388,14 @@ is_wireless_device () return 1 } +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 + echo "+$1" > /sys/class/net/bonding_masters + return 0 +} + is_bonding_device () { [ "${TYPE}" = "Bonding" ] && return 0 |