From 81523689c1ff362f8d2f530ce310384c026dac88 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Mon, 5 Jan 2004 21:55:39 +0000 Subject: [PATCH] getVserverStatus(): fixed usage of 2nd parameter git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@538 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/scripts/functions | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-vserver/scripts/functions b/util-vserver/scripts/functions index 69466ba..c3829fa 100644 --- a/util-vserver/scripts/functions +++ b/util-vserver/scripts/functions @@ -260,10 +260,13 @@ function getAllVservers function getVserverStatus { test -r "$1"/run || return 1 - eval read "$2" <"$1"/run + + local _ctx + read _ctx <"$1"/run + eval "$2"=\$_ctx test "$3" || return 0 - local _tmp=$($_VPS ax | $_AWK '{print $2}' | $_GREP -x "$2" | $_WC -l ) + local _tmp=$($_VPS ax | $_AWK '{print $2}' | $_GREP -x "$_ctx" | $_WC -l ) eval "$3"=\$_tmp test "$4" -a $_tmp = 0 || return 0 -- 1.8.1.5