updated start/stop help-messages
[util-vserver.git] / util-vserver / scripts / functions
index 32a1bc7..1b94ce4 100644 (file)
@@ -154,6 +154,9 @@ function _pkgSetVarsApt
        findDir APTCACHEDIR  "$VDIR"/var/cache/apt
        findDir APTARCHIVDIR "$VDIR"/var/cache/apt/archives /var/cache/apt/archives
     fi
+
+    findFile APT_CONFIG "$APTETCDIR"/apt.conf ""
+    test -z "$APT_CONFIG" || export APT_CONFIG
 }
 
 function _pkgMountBase
@@ -237,17 +240,20 @@ 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
+       case "$i" in
+           *.~*~) continue;;
+       esac
 
-       tmp=( "${tmp[@]}" "${i##$CONFDIR/}")
+       _tmp=( "${_tmp[@]}" "${i##$CONFDIR/}")
     done
 
-    eval $1=\$tmp
+    eval $1='( "${_tmp[@]}" )'
 }
 
 ## Usage: getVserverCtx <vdir> <result-varname> [<procnumber-varname> [<do-cleanup>]]