diff options
author | Roy Marples <roy@marples.name> | 2007-10-29 09:45:49 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-10-29 09:45:49 +0000 |
commit | e372729b8cc489af7b1b2305d6fd9c1895b9c8d4 (patch) | |
tree | 5ffa0e392d92a03bd23fe8f00aa2d6a26d41ffbb /net.Linux/bonding.sh | |
parent | 42c231d7609447cb96d98cbebdc12a197324fb99 (diff) |
Network config arrays are now split by embedded new lines instead of being evaled into space separated values. This makes it easier to read, maintain and document as discussed on gentoo-dev.
Diffstat (limited to 'net.Linux/bonding.sh')
-rw-r--r-- | net.Linux/bonding.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net.Linux/bonding.sh b/net.Linux/bonding.sh index 1f8b6377..ed3d9827 100644 --- a/net.Linux/bonding.sh +++ b/net.Linux/bonding.sh @@ -13,10 +13,9 @@ _is_bond() { } bonding_pre_start() { - local s= slaves= + local s= slaves="$(_get_array "slaves_${IFVAR}")" - eval $(_get_array "slaves_${IFVAR}") - [ $# = "0" ] && return 0 + [ -z "${slaves}" ] && return 0 # Load the kernel module if required if [ ! -d /proc/net/bonding ] ; then @@ -40,16 +39,16 @@ bonding_pre_start() { ebegin "Adding slaves to ${IFACE}" eindent - einfo "$@" + einfo "${slaves}" # Check that our slaves exist ( - for IFACE in "$@" ; do + for IFACE in ${slaves}; do _exists true || return 1 done # Must force the slaves to a particular state before adding them - for IFACE in "$@" ; do + for IFACE in ${slaves}; do _delete_addresses _up done @@ -60,7 +59,7 @@ bonding_pre_start() { # finally add in slaves eoutdent - /sbin/ifenslave "${IFACE}" $@ >/dev/null + /sbin/ifenslave "${IFACE}" ${slaves} >/dev/null eend $? return 0 #important |