}
. "$UTIL_VSERVER_VARS"
. "$_LIB_FUNCTIONS"
+. "$__PKGLIBDIR/vserver.functions"
function showHelp()
if pkgmgmt.isInternal "$i"; then
$_VSERVER "$i" exec "$cmd" "$@"
else
- callInNamespace "$i" \
- "$_VNAMESPACE" --new -- "$VSOMETHING_WORKER" "$i" "$@"
+ _setVserverDir "$i"
+ # subshell so we don't have to clean up
+ ( _generateChbindOptions "$VSERVER_DIR"
+ $_VSERVER "$i" status &> /dev/null || \
+ CHBIND_CMD=()
+ callInNamespace "$i" \
+ "$_VNAMESPACE" --new -- \
+ "${CHBIND_CMD[@]}" \
+ "$VSOMETHING_WORKER" "$i" "$@" )
fi
else
"$cmd" "$i" "$@"