Try and describe bonding errors a bit more.

This commit is contained in:
Roy Marples 2010-03-24 20:41:18 +00:00
parent 67b538fd26
commit ae7a92ae7b

View File

@ -15,7 +15,7 @@ _is_bond()
bonding_pre_start() bonding_pre_start()
{ {
local x= s= slaves="$(_get_array "slaves_${IFVAR}")" local x= s= n= slaves="$(_get_array "slaves_${IFVAR}")"
[ -z "${slaves}" ] && return 0 [ -z "${slaves}" ] && return 0
@ -43,9 +43,11 @@ bonding_pre_start()
# Nice and dynamic :) # Nice and dynamic :)
for x in /sys/class/net/"${IFACE}"/bonding/*; do for x in /sys/class/net/"${IFACE}"/bonding/*; do
[ -f "${x}" ] || continue [ -f "${x}" ] || continue
eval s=\$${x##*/}_${IFVAR} n=${x##*/}
eval s=\$${n}_${IFVAR}
if [ -n "${s}" ]; then if [ -n "${s}" ]; then
echo "${s}" >"${x}" echo "${s}" >"${x}" || \
eerror "Failed to configure $n (${n}_${IFVAR})"
fi fi
done done