From e372729b8cc489af7b1b2305d6fd9c1895b9c8d4 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 29 Oct 2007 09:45:49 +0000 Subject: 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. --- net.Linux/clip.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'net.Linux/clip.sh') diff --git a/net.Linux/clip.sh b/net.Linux/clip.sh index 7d3fef9b..771ec204 100644 --- a/net.Linux/clip.sh +++ b/net.Linux/clip.sh @@ -79,8 +79,9 @@ are_atmclip_svcs_running() { } clip_pre_start() { - eval $(_get_array "clip_${IFVAR}") - [ $# = 0 ] && return 0 + local clip= + eval clip=\$clip_${IFVAR} + [ -z "${clip}" ] && return 0 if [ ! -r /proc/net/atm/arp ] ; then modprobe clip && sleep 2 @@ -109,8 +110,8 @@ clip_pre_start() { } clip_post_start() { - eval $(_get_array "clip_${IFVAR}") - [ $# = 0 ] && return 0 + local clip="$(_get_array "clip_${IFVAR}")" + [ -z "${clip}" ] && return 0 are_atmclip_svcs_running || return 1 @@ -129,8 +130,10 @@ clip_post_start() { # reporting problems. Also, when no defined VC can be established, # we stop the ATM daemons. local has_failures= i= - for i in "$@" ; do + for i in ${clip} ; do + local IFS="," set -- ${i} + unset IFS local peerip="$1"; shift local ifvpivci="$1"; shift ebegin "Creating PVC ${ifvpivci} for peer ${peerip}" -- cgit v1.2.3