aboutsummaryrefslogtreecommitdiff
path: root/net.Linux/clip.sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-10-29 09:45:49 +0000
committerRoy Marples <roy@marples.name>2007-10-29 09:45:49 +0000
commite372729b8cc489af7b1b2305d6fd9c1895b9c8d4 (patch)
tree5ffa0e392d92a03bd23fe8f00aa2d6a26d41ffbb /net.Linux/clip.sh
parent42c231d7609447cb96d98cbebdc12a197324fb99 (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/clip.sh')
-rw-r--r--net.Linux/clip.sh13
1 files changed, 8 insertions, 5 deletions
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}"