summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2010-03-24 20:41:18 +0000
committerRoy Marples <roy@marples.name>2010-03-24 20:41:18 +0000
commitae7a92ae7b54fd832a211546edeb290f854fdad2 (patch)
tree5b826e64a80ba44328864740f95adfe5417ae3ff
parent67b538fd262c72198e1b293f6bea314051034656 (diff)
downloadopenrc-ae7a92ae7b54fd832a211546edeb290f854fdad2.tar.gz
openrc-ae7a92ae7b54fd832a211546edeb290f854fdad2.tar.bz2
openrc-ae7a92ae7b54fd832a211546edeb290f854fdad2.tar.xz
Try and describe bonding errors a bit more.
-rw-r--r--net/bonding.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/bonding.sh b/net/bonding.sh
index 793280b..559c9a1 100644
--- a/net/bonding.sh
+++ b/net/bonding.sh
@@ -15,7 +15,7 @@ _is_bond()
bonding_pre_start()
{
- local x= s= slaves="$(_get_array "slaves_${IFVAR}")"
+ local x= s= n= slaves="$(_get_array "slaves_${IFVAR}")"
[ -z "${slaves}" ] && return 0
@@ -43,9 +43,11 @@ bonding_pre_start()
# Nice and dynamic :)
for x in /sys/class/net/"${IFACE}"/bonding/*; do
[ -f "${x}" ] || continue
- eval s=\$${x##*/}_${IFVAR}
+ n=${x##*/}
+ eval s=\$${n}_${IFVAR}
if [ -n "${s}" ]; then
- echo "${s}" >"${x}"
+ echo "${s}" >"${x}" || \
+ eerror "Failed to configure $n (${n}_${IFVAR})"
fi
done