From: Daniel Hokka Zakrisson Date: Wed, 23 Feb 2011 20:27:45 +0000 (+0000) Subject: Fix infinite loop when used incorrectly. X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2198e1310cfb92238d64df180085a0263c7a4199;p=util-vserver.git Fix infinite loop when used incorrectly. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2936 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/scripts/vsomething b/scripts/vsomething index c65c3ee..a87c1b7 100755 --- a/scripts/vsomething +++ b/scripts/vsomething @@ -87,7 +87,7 @@ test "$1" != "--" || \ if getAllVserversByArg tmp "$@"; then vservers=( "${vservers[@]}" "${tmp[@]}" ) - while test "$1" != "--"; do + while test "$#" -ge 1 -a "$1" != "--"; do shift done shift