From 323b8246cf059486e0efcc01a247fa325850206d Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Tue, 15 Feb 2005 22:18:53 +0000 Subject: [PATCH] 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 --- util-vserver/scripts/vshelper | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 1.8.1.5