aboutsummaryrefslogtreecommitdiff
path: root/net/bonding.sh
diff options
context:
space:
mode:
authorLorand Kelemen <lorand.kelemen@indgroup.eu>2012-10-17 12:53:17 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2012-10-17 12:53:17 -0500
commitf671e0a28fe566566b5465afbda985542f77ed8a (patch)
treea3e9eae34ab7b68fd3debd3c09c486cad3e74f7a /net/bonding.sh
parent6d84a4aed8dd519641c8fd6994fb93135efb122d (diff)
Oldnet: bonding: set miimon correctly
Miimon needs to be activated before downdelay is set. X-Gentoo-Bug: 421757 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=421757
Diffstat (limited to 'net/bonding.sh')
-rw-r--r--net/bonding.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/bonding.sh b/net/bonding.sh
index 7ea75085..044ce21c 100644
--- a/net/bonding.sh
+++ b/net/bonding.sh
@@ -74,12 +74,23 @@ bonding_pre_start()
eerror "Failed to configure $n (${n}_${IFVAR})"
fi
done
+ # Configure link monitoring
+ for x in /sys/class/net/"${IFACE}"/bonding/miimon; do
+ [ -f "${x}" ] || continue
+ n=${x##*/}
+ eval s=\$${n}_${IFVAR}
+ if [ -n "${s}" ]; then
+ einfo "Setting ${n}: ${s}"
+ echo "${s}" >"${x}" || \
+ eerror "Failed to configure $n (${n}_${IFVAR})"
+ fi
+ done
# Nice and dynamic for remaining options:)
[ -d /sys/class/net ] && for x in /sys/class/net/"${IFACE}"/bonding/*; do
[ -f "${x}" ] || continue
n=${x##*/}
eval s=\$${n}_${IFVAR}
- [ "${n}" != "mode" ] || continue
+ [ "${n}" != "mode" -o "${n}" != "miimon" ] || continue
if [ -n "${s}" ]; then
einfo "Setting ${n}: ${s}"
echo "${s}" >"${x}" || \