Preparations for actually reading mtab.
[util-vserver.git] / scripts / vsomething
index cd3c972..3ae3762 100755 (executable)
@@ -106,10 +106,11 @@ for i in "${vservers[@]}"; do
        if pkgmgmt.isInternal "$i"; then
            $_VSERVER "$i" exec "$cmd" "$@"
        else
-           _getVserverDir "$i"
+           _setVserverDir "$i"
+           # subshell so we don't have to clean up
            ( _generateChbindOptions "$VSERVER_DIR"
-             $_VSERVER "$i" status &> /dev/null && \
-               CHBIND_CMD=( "$_CHBIND" "${CHBIND_OPTS[@]}" -- )
+             $_VSERVER "$i" status &> /dev/null || \
+               CHBIND_CMD=()
              callInNamespace "$i" \
                "$_VNAMESPACE" --new -- \
                "${CHBIND_CMD[@]}" \