geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r743129 - in /geronimo/server/branches/2.1: assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/ plugins/jaxws/jaxws-tools/src/main/resources/bin/ plugins/procrun/src/main/resources/bin/
Date Tue, 10 Feb 2009 22:04:00 GMT
Author: gawor
Date: Tue Feb 10 22:04:00 2009
New Revision: 743129

URL: http://svn.apache.org/viewvc?rev=743129&view=rev
Log:
error code batch file improvements - as suggested by Jack Cai (GERONIMO-4525)

Modified:
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/client.bat
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/deploy.bat
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/gsh.bat
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/shutdown.bat
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server.bat
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/startup.bat
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat
    geronimo/server/branches/2.1/plugins/jaxws/jaxws-tools/src/main/resources/bin/jaxws-tools.bat
    geronimo/server/branches/2.1/plugins/procrun/src/main/resources/bin/service_pr.bat

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/client.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/client.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/client.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/client.bat
Tue Feb 10 22:04:00 2009
@@ -90,20 +90,19 @@
 @REM
 @REM Exit Codes:
 @REM
-@REM  0 - Success
-@REM  1 - Error
+@REM  0        - Success
+@REM  Non-zero - Error
 @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
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 if not "%GERONIMO_HOME%" == "" goto resolveHome
 @REM %~dp0 is expanded pathname of the current script
@@ -120,7 +119,7 @@
 if exist "%GERONIMO_HOME%\bin\client.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
+cmd /c exit /b 1
 goto end
 :okHome
 
@@ -134,7 +133,7 @@
 if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv
 echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat
 echo This file is needed to run this program
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%GERONIMO_HOME%
@@ -166,3 +165,4 @@
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/deploy.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/deploy.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/deploy.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/deploy.bat
Tue Feb 10 22:04:00 2009
@@ -90,20 +90,19 @@
 @REM
 @REM Exit Codes:
 @REM
-@REM  0 - Success
-@REM  1 - Error
+@REM  0        - Success
+@REM  Non-zero - Error
 @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
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 if not "%GERONIMO_HOME%" == "" goto resolveHome
 @REM %~dp0 is expanded pathname of the current script
@@ -120,7 +119,7 @@
 if exist "%GERONIMO_HOME%\bin\deploy.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
+cmd /c exit /b 1
 goto end
 :okHome
 
@@ -134,7 +133,7 @@
 if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv
 echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat
 echo This file is needed to run this program
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%GERONIMO_HOME%
@@ -166,3 +165,4 @@
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/geronimo.bat
Tue Feb 10 22:04:00 2009
@@ -126,8 +126,8 @@
 @REM
 @REM Exit Codes:
 @REM
-@REM  0 - Success
-@REM  1 - Error
+@REM  0        - Success
+@REM  Non-zero - Error
 @REM ---------------------------------------------------------------------------
 
 @if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
@@ -135,12 +135,11 @@
 
 if "%OS%" == "Windows_NT" goto okOsCheck
 echo Cannot process Geronimo command - you are running an unsupported operating system.
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 if not "%GERONIMO_HOME%" == "" goto resolveHome
 @REM %~dp0 is expanded pathname of the current script
@@ -157,7 +156,7 @@
 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
+cmd /c exit /b 1
 goto end
 :okHome
 
@@ -171,7 +170,7 @@
 if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv
 echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat
 echo This file is needed to run this program
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%GERONIMO_HOME%
@@ -251,6 +250,7 @@
 echo        --host        Hostname of the server
 echo        --port        RMI port to connect to
 echo        --secure      Enable secure JMX communication
+cmd /c exit /b 1
 goto end
 
 :doDebug
@@ -306,6 +306,9 @@
 set JAVA_AGENT_OPTS=
 if exist "%JAVA_AGENT_JAR%" set JAVA_AGENT_OPTS=-javaagent:"%JAVA_AGENT_JAR%"
 
+@REM Must reset ERRORLEVEL
+cmd /c exit /b 0
+
 @REM Execute Java with the applicable properties
 if not "%JDB%" == "" goto doJDB
 %_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed"
-Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"
-Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %_LONG_OPT% %CMD_LINE_ARGS%
@@ -319,3 +322,4 @@
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/gsh.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/gsh.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/gsh.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/gsh.bat
Tue Feb 10 22:04:00 2009
@@ -26,12 +26,11 @@
 
 if "%OS%" == "Windows_NT" goto okOsCheck
 echo Cannot process command - you are running an unsupported operating system.
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 set DIRNAME=%~dp0
 if "%DIRNAME%" == "" set DIRNAME=.\
@@ -45,7 +44,7 @@
 @REM Get standard Java environment variables
 if exist "%DIRNAME%\setjavaenv.bat" goto okSetJavaEnv
 echo ERROR - Cannot find %DIRNAME%\setjavaenv.bat
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%DIRNAME%
@@ -83,3 +82,4 @@
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat
Tue Feb 10 22:04:00 2009
@@ -61,7 +61,7 @@
 if "%jdkOrJreHomeSet%" == "1" goto gotJdkOrJreHome
 echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
 echo At least one of these environment variable is needed to run this program
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 @REM If we get this far we have either JAVA_HOME or JRE_HOME set
@@ -81,7 +81,7 @@
 echo The JAVA_HOME environment variable is not defined correctly
 echo This environment variable is needed to run this program
 echo NB: JAVA_HOME should point to a JDK not a JRE
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okJdkFileCheck

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/shutdown.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/shutdown.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/shutdown.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/shutdown.bat
Tue Feb 10 22:04:00 2009
@@ -50,12 +50,11 @@
 
 if "%OS%" == "Windows_NT" goto okOsCheck
 echo Cannot process Geronimo command - you are running an unsupported operating system.
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 if not "%GERONIMO_HOME%" == "" goto resolveHome
 @REM %~dp0 is expanded pathname of the current script
@@ -72,7 +71,7 @@
 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
+cmd /c exit /b 1
 goto end
 
 :okHome
@@ -83,7 +82,7 @@
 if exist "%EXECUTABLE%" goto okExec
 echo Cannot find %EXECUTABLE%
 echo This file is needed to run this program
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 :okExec
 
@@ -102,3 +101,4 @@
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server.bat
Tue Feb 10 22:04:00 2009
@@ -45,12 +45,11 @@
 
 if "%OS%"=="Windows_NT" goto okOsCheck
 echo Cannot process command - you are running an unsupported operating system.
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 set DIRNAME=%~dp0
 if "%DIRNAME%" == "" set DIRNAME=.\
@@ -61,7 +60,7 @@
 @REM Check that target executable exists
 if exist "%EXECUTABLE%" goto okExec
 echo ERROR - Cannot find required script %EXECUTABLE%
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okExec
@@ -80,3 +79,4 @@
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/startup.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/startup.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/startup.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/startup.bat
Tue Feb 10 22:04:00 2009
@@ -46,12 +46,11 @@
 
 if "%OS%" == "Windows_NT" goto okOsCheck
 echo Cannot process Geronimo command - you are running an unsupported operating system.
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 if not "%GERONIMO_HOME%" == "" goto resolveHome
 @REM %~dp0 is expanded pathname of the current script
@@ -68,7 +67,7 @@
 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
+cmd /c exit /b 1
 goto end
 :okHome
 
@@ -78,7 +77,7 @@
 if exist "%EXECUTABLE%" goto okExec
 echo Cannot find %EXECUTABLE%
 echo This file is needed to run this program
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 :okExec
 
@@ -97,3 +96,4 @@
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat
Tue Feb 10 22:04:00 2009
@@ -45,12 +45,11 @@
 
 if "%OS%"=="Windows_NT" goto okOsCheck
 echo Cannot process command - you are running an unsupported operating system.
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 set DIRNAME=%~dp0
 if "%DIRNAME%" == "" set DIRNAME=.\
@@ -61,7 +60,7 @@
 @REM Check that target executable exists
 if exist "%EXECUTABLE%" goto okExec
 echo ERROR - Cannot find required script %EXECUTABLE%
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okExec
@@ -80,3 +79,4 @@
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/branches/2.1/plugins/jaxws/jaxws-tools/src/main/resources/bin/jaxws-tools.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/jaxws/jaxws-tools/src/main/resources/bin/jaxws-tools.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/jaxws/jaxws-tools/src/main/resources/bin/jaxws-tools.bat
(original)
+++ geronimo/server/branches/2.1/plugins/jaxws/jaxws-tools/src/main/resources/bin/jaxws-tools.bat
Tue Feb 10 22:04:00 2009
@@ -88,20 +88,19 @@
 @REM
 @REM Exit Codes:
 @REM
-@REM  0 - Success
-@REM  1 - Error
+@REM  0        - Success
+@REM  Non-zero - Error
 @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
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 if not "%GERONIMO_HOME%" == "" goto resolveHome
 @REM %~dp0 is expanded pathname of the current script
@@ -118,7 +117,7 @@
 if exist "%GERONIMO_HOME%\bin\deploy.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
+cmd /c exit /b 1
 goto end
 :okHome
 
@@ -132,7 +131,7 @@
 if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv
 echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat
 echo This file is needed to run this program
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%GERONIMO_HOME%
@@ -164,3 +163,4 @@
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%

Modified: geronimo/server/branches/2.1/plugins/procrun/src/main/resources/bin/service_pr.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/procrun/src/main/resources/bin/service_pr.bat?rev=743129&r1=743128&r2=743129&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/procrun/src/main/resources/bin/service_pr.bat (original)
+++ geronimo/server/branches/2.1/plugins/procrun/src/main/resources/bin/service_pr.bat Tue
Feb 10 22:04:00 2009
@@ -85,8 +85,8 @@
 @REM
 @REM Exit Codes:
 @REM
-@REM  0 - Success
-@REM  1 - Error
+@REM  0        - Success
+@REM  Non-zero - Error
 @REM ---------------------------------------------------------------------------
 
 @if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
@@ -94,12 +94,11 @@
 
 if "%OS%" == "Windows_NT" goto okOsCheck
 echo Cannot process Geronimo command - you are running an unsupported operating system.
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 
 :okOsCheck
 @setlocal enableextensions
-@set ERRORLEVEL=0
 
 if not "%GERONIMO_HOME%" == "" goto resolveHome
 @REM %~dp0 is expanded pathname of the current script
@@ -116,7 +115,7 @@
 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
+cmd /c exit /b 1
 goto end
 :okHome
 
@@ -130,7 +129,7 @@
 if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv
 echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat
 echo This file is needed to run this program
-set ERRORLEVEL=1
+cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%GERONIMO_HOME%
@@ -165,6 +164,7 @@
 echo   --password  Admin password, default to "manager"
 echo   --port      RMI port to connect to, default to 1099
 echo   --secure    Optional flag for enabling secure JMX communication
+cmd /c exit /b 1
 goto end
 
 :doRemove
@@ -224,15 +224,7 @@
 echo The service "%SERVICE_NAME%" has been installed.
 
 :end
-@REM Clear the environment variables. They are not needed any more.
-set PR_DISPLAYNAME=
-set PR_DESCRIPTION=
-set PR_INSTALL=
-set PR_LOGPATH=
-set PR_LOGLEVEL=
-set PR_LOGPREFIX=
-set PR_STDOUTPUT=
-set PR_STDERROR=
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause
 @endlocal
+cmd /c exit /b %errorlevel%



Mime
View raw message