From: Enrico Scholz Date: Tue, 4 Nov 2003 13:52:46 +0000 (+0000) Subject: - getAllVservers: use _tmp instead of tmp to avoid clashes when caller X-Git-Tag: VERSION_0_10~1086 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ff92b84743739274ba5081f94489a6daace1006;hp=f6324ad5701d4986f066b37c822c79a7a235dfe7;p=util-vserver.git - getAllVservers: use _tmp instead of tmp to avoid clashes when caller wants to have results in 'tmp', fixed array assignment git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@372 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/functions b/util-vserver/scripts/functions index 32a1bc7..189f462 100644 --- a/util-vserver/scripts/functions +++ b/util-vserver/scripts/functions @@ -237,17 +237,17 @@ function pkgInit function getAllVservers { local i - declare -a tmp=() + declare -a _tmp=() for i in $CONFDIR/*; do test -d "$i" || continue test ! -e "$i"/disabled || continue test -d "$i"/vdir || continue - tmp=( "${tmp[@]}" "${i##$CONFDIR/}") + _tmp=( "${_tmp[@]}" "${i##$CONFDIR/}") done - eval $1=\$tmp + eval $1='( "${_tmp[@]}" )' } ## Usage: getVserverCtx [ []]