X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fvsomething;h=a8680e7b26f823c53d7f6e7e8f6ecf082227e999;hb=95e2774070e989fe9cf9f48dae5fa054e55e2a3e;hp=d6060219fa1a76957e80a62732ff79fc0cf1c73f;hpb=3b34449070c0846fdc49436d1edd5916512f1644;p=util-vserver.git diff --git a/scripts/vsomething b/scripts/vsomething index d606021..a8680e7 100755 --- a/scripts/vsomething +++ b/scripts/vsomething @@ -1,5 +1,5 @@ #! /bin/bash -# $Id: vsomething 2303 2006-09-12 12:39:00Z dhozac $ +# $Id: vsomething 2599 2007-08-26 21:30:50Z dhozac $ # Copyright (C) 2005 Enrico Scholz # @@ -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[@]}" \