From: Enrico Scholz Date: Tue, 15 Feb 2005 22:18:53 +0000 (+0000) Subject: adjusted the order of cli options evaluation; automake-1.9.5 redirects X-Git-Tag: IPSENTINEL_VERSION_0_12~134 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=323b8246cf059486e0efcc01a247fa325850206d;p=util-vserver.git adjusted the order of cli options evaluation; automake-1.9.5 redirects input from /dev/null so the 'tty -s' check gets triggered and 'make distcheck' fails in the '... --version/--help' tests git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1860 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/vshelper b/util-vserver/scripts/vshelper index fc6ee6f..b14aa69 100755 --- a/util-vserver/scripts/vshelper +++ b/util-vserver/scripts/vshelper @@ -113,6 +113,9 @@ function doDefaultMethod #=========== +test "$1" != '--version' || showVersion +test "$1" != '--help' || showHelp + if ! tty -s; then findObject -e _VS_LOGFILE "$CONFDIR"/.defaults/apps/vshelper/logfile /dev/null findObject -e _VS_ERRFILE "$CONFDIR"/.defaults/apps/vshelper/logfile /dev/null @@ -121,14 +124,13 @@ if ! tty -s; then exec >>$_VS_LOGFILE exec 2>>$_VS_ERRFILE fi - -logging "$(date): vshelper $*" -test "$1" != '--version' || showVersion -test "$1" != '--help' || showHelp +logging "$(date): vshelper $*" + test "$#" -ge 2 || panic $"vshelper called with missing arguments; try '--help' for more information" + vshelper.isEnabled || exit 0 ! vshelper.isDebug || set -x