geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsis...@apache.org
Subject svn commit: r376515 - /geronimo/branches/1.0/modules/scripts/src/resources/bin/shutdown.bat
Date Fri, 10 Feb 2006 00:49:21 GMT
Author: jsisson
Date: Thu Feb  9 16:49:20 2006
New Revision: 376515

URL: http://svn.apache.org/viewcvs?rev=376515&view=rev
Log:
GERONIMO-1603 - shutdown.bat does not set ERRORLEVEL and does not honour GERONIMO_BATCH_ECHO
and GERONIMO_BATCH_PAUSE environment variables (merged from trunk)

Modified:
    geronimo/branches/1.0/modules/scripts/src/resources/bin/shutdown.bat

Modified: geronimo/branches/1.0/modules/scripts/src/resources/bin/shutdown.bat
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0/modules/scripts/src/resources/bin/shutdown.bat?rev=376515&r1=376514&r2=376515&view=diff
==============================================================================
--- geronimo/branches/1.0/modules/scripts/src/resources/bin/shutdown.bat (original)
+++ geronimo/branches/1.0/modules/scripts/src/resources/bin/shutdown.bat Thu Feb  9 16:49:20
2006
@@ -1,52 +1,61 @@
-@echo off
-rem
-rem  Copyright 2005 The Apache Software Foundation
-rem
-rem   Licensed under the Apache License, Version 2.0 (the "License");
-rem   you may not use this file except in compliance with the License.
-rem   You may obtain a copy of the License at
-rem
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem   Unless required by applicable law or agreed to in writing, software
-rem   distributed under the License is distributed on an "AS IS" BASIS,
-rem   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem   See the License for the specific language governing permissions and
-rem   limitations under the License.
-rem
-rem --------------------------------------------------------------------
-rem $Rev$ $Date$
-rem --------------------------------------------------------------------
-rem
-rem --------------------------------------------------------------------
-rem Shutdown batch file for Geronimo.
-rem
-rem This batch file calls the geronimo.bat script passing "stop" as the
-rem first argument followed by the arguments supplied by the caller.
-rem
-rem This batch file is based upon Tomcat's shutdown.bat file to enable
-rem those familiar with Tomcat to easily stop Geronimo.
-rem 
-rem Alternatively you can use the more comprehensive geronimo.bat file 
-rem directly.
-rem
-rem Invocation Syntax:
-rem
-rem   shutdown [stop command args ...]
-rem
-rem   Invoke the shutdown.bat file without any arguments for information
-rem   on arguments for the geronimo.bat stop command that is invoked by
-rem   this batch file.
-rem
-rem Environment Variable Prequisites:
-rem
-rem   Refer to the documentation in the geronimo.bat file for information
-rem   on environment variables etc.
-rem
-rem --------------------------------------------------------------------
-if "%OS%" == "Windows_NT" setlocal
+@REM
+@REM  Copyright 2005 The Apache Software Foundation
+@REM
+@REM   Licensed under the Apache License, Version 2.0 (the "License");
+@REM   you may not use this file except in compliance with the License.
+@REM   You may obtain a copy of the License at
+@REM
+@REM      http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM   Unless required by applicable law or agreed to in writing, software
+@REM   distributed under the License is distributed on an "AS IS" BASIS,
+@REM   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM   See the License for the specific language governing permissions and
+@REM   limitations under the License.
+
+@REM --------------------------------------------------------------------
+@REM $Rev$ $Date$
+@REM --------------------------------------------------------------------
+
+@REM --------------------------------------------------------------------
+@REM Shutdown batch file for Geronimo.
+@REM
+@REM This batch file calls the geronimo.bat script passing "stop" as the
+@REM first argument followed by the arguments supplied by the caller.
+@REM
+@REM This batch file is based upon Tomcat's shutdown.bat file to enable
+@REM those familiar with Tomcat to easily stop Geronimo.
+@REM 
+@REM Alternatively you can use the more comprehensive geronimo.bat file 
+@REM directly.
+@REM
+@REM Invocation Syntax:
+@REM
+@REM   shutdown [stop command args ...]
+@REM
+@REM   Invoke the shutdown.bat file without any arguments for information
+@REM   on arguments for the geronimo.bat stop command that is invoked by
+@REM   this batch file.
+@REM
+@REM Environment Variable Prequisites:
+@REM
+@REM   Refer to the documentation in the geronimo.bat file for information
+@REM   on environment variables etc.
+@REM
+@REM --------------------------------------------------------------------
+
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+if "%OS%" == "Windows_NT" goto okOsCheck
+echo Cannot process Geronimo command - you are running an unsupported operating system.
+set ERRORLEVEL=1
+goto end
+
+:okOsCheck
+setlocal
 
-rem Guess GERONIMO_HOME if not defined
+@REM Guess GERONIMO_HOME if not defined
 set CURRENT_DIR=%cd%
 if not "%GERONIMO_HOME%" == "" goto gotHome
 set GERONIMO_HOME=%CURRENT_DIR%
@@ -58,19 +67,21 @@
 if exist "%GERONIMO_HOME%\bin\geronimo.bat" goto okHome
 echo The GERONIMO_HOME environment variable is not defined correctly
 echo This environment variable is needed to run this program
+set ERRORLEVEL=1
 goto end
 :okHome
 
 set EXECUTABLE=%GERONIMO_HOME%\bin\geronimo.bat
 
-rem Check that target executable exists
+@REM Check that target executable exists
 if exist "%EXECUTABLE%" goto okExec
 echo Cannot find %EXECUTABLE%
 echo This file is needed to run this program
+set ERRORLEVEL=1
 goto end
 :okExec
 
-rem Get remaining unshifted command line arguments and save them in the
+@REM Get remaining unshifted command line arguments and save them in the
 set CMD_LINE_ARGS=
 :setArgs
 if ""%1""=="""" goto doneSetArgs
@@ -82,3 +93,6 @@
 call "%EXECUTABLE%" stop %CMD_LINE_ARGS%
 
 :end
+
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause



Mime
View raw message