aboutsummaryrefslogtreecommitdiff
path: root/net/bonding.sh
diff options
context:
space:
mode:
Diffstat (limited to 'net/bonding.sh')
-rw-r--r--net/bonding.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/bonding.sh b/net/bonding.sh
index 99a85170..34a96e13 100644
--- a/net/bonding.sh
+++ b/net/bonding.sh
@@ -15,7 +15,7 @@ _is_bond()
bonding_pre_start()
{
- local s= slaves="$(_get_array "slaves_${IFVAR}")"
+ local x= s= slaves="$(_get_array "slaves_${IFVAR}")"
[ -z "${slaves}" ] && return 0
@@ -39,6 +39,16 @@ bonding_pre_start()
return 1
fi
+ # Configure the bond.
+ # Nice and dynamic :)
+ for x in /sys/class/net/"${IFACE}"/bonding/*; do
+ [ -f "${x}" ] || continue
+ eval s=\$${x##*/}_${IFVAR}
+ if [ -n "${s}" ]; then
+ echo "${s}" >"${x}"
+ fi
+ done
+
ebegin "Adding slaves to ${IFACE}"
eindent
einfo "${slaves}"