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
#===========
+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
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