adjusted the order of cli options evaluation; automake-1.9.5 redirects
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 15 Feb 2005 22:18:53 +0000 (22:18 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 15 Feb 2005 22:18:53 +0000 (22:18 +0000)
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

index fc6ee6f..b14aa69 100755 (executable)
@@ -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