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
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 <vdir> <result-varname> [<procnumber-varname> [<do-cleanup>]]