geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanhongf...@apache.org
Subject svn commit: r1032465 - in /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution: unix-shell/bin/geronimo windows-text/bin/geronimo.bat
Date Mon, 08 Nov 2010 05:56:57 GMT
Author: hanhongfang
Date: Mon Nov  8 05:56:56 2010
New Revision: 1032465

URL: http://svn.apache.org/viewvc?rev=1032465&view=rev
Log:
GERONIMO-5590 startup script does not consume --help option

Modified:
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo?rev=1032465&r1=1032464&r2=1032465&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
(original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
Mon Nov  8 05:56:56 2010
@@ -348,45 +348,81 @@ elif [ "$1" = "run" ]; then
 
 elif [ "$1" = "start" ] ; then
   shift
-  touch "$GERONIMO_OUT"
-  if [ -f "$JAVA_AGENT_JAR" ]; then
-      $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
-        -javaagent:"$JAVA_AGENT_JAR" \
-        -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true \
-        -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
-        -Dkaraf.home="$GERONIMO_HOME" \
-        -Dkaraf.base="$GERONIMO_HOME" \
-        -Djava.util.logging.config.file="$GERONIMO_HOME"/etc/java.util.logging.properties
\
-        -Djava.endorsed.dirs="$ENDORSED_DIRS" \
-        -Djava.ext.dirs="$EXT_DIRS" \
-        -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
-        -classpath "$CLASSPATH" \
-        org.apache.geronimo.cli.daemon.DaemonCLI $LONG_OPT "$@" \
-        >> $GERONIMO_OUT 2>&1 &
-        echo ""
-        echo "Geronimo started in background. PID: $!"
-        if [ ! -z "$GERONIMO_PID" ]; then
-          echo $! > $GERONIMO_PID
-        fi
+  ISHelp=false
+  case "$1" in
+  --help) ISHelp=true;;
+  -help) ISHelp=true;;
+  -h) ISHelp=true;;
+  esac
+  if $ISHelp; then
+      if [ -f "$JAVA_AGENT_JAR" ]; then
+        exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+          -javaagent:"$JAVA_AGENT_JAR" \
+          -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true \
+          -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+          -Dkaraf.home="$GERONIMO_HOME" \
+          -Dkaraf.base="$GERONIMO_HOME" \
+          -Djava.util.logging.config.file=$GERONIMO_HOME/etc/java.util.logging.properties
\
+          -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+          -Djava.ext.dirs="$EXT_DIRS" \
+          -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+          -classpath "$CLASSPATH" \
+          org.apache.geronimo.cli.daemon.DaemonCLI $LONG_OPT "$@"
+      else
+        exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+          -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true \
+          -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+          -Dkaraf.home="$GERONIMO_HOME" \
+          -Dkaraf.base="$GERONIMO_HOME" \
+          -Djava.util.logging.config.file=$GERONIMO_HOME/etc/java.util.logging.properties
\
+          -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+          -Djava.ext.dirs="$EXT_DIRS" \
+          -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+          -classpath "$CLASSPATH" \
+          org.apache.geronimo.cli.daemon.DaemonCLI $LONG_OPT "$@"
+      fi    
   else
-      $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
-        -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true \
-        -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
-        -Dkaraf.home="$GERONIMO_HOME" \
-        -Dkaraf.base="$GERONIMO_HOME" \
-        -Djava.util.logging.config.file="$GERONIMO_HOME"/etc/java.util.logging.properties
\
-        -Djava.endorsed.dirs="$ENDORSED_DIRS" \
-        -Djava.ext.dirs="$EXT_DIRS" \
-        -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
-        -classpath "$CLASSPATH" \
-        org.apache.geronimo.cli.daemon.DaemonCLI $LONG_OPT "$@" \
-        >> $GERONIMO_OUT 2>&1 &
-        echo ""
-        echo "Geronimo started in background. PID: $!"
-        if [ ! -z "$GERONIMO_PID" ]; then
-          echo $! > $GERONIMO_PID
-        fi
+      touch "$GERONIMO_OUT"
+      if [ -f "$JAVA_AGENT_JAR" ]; then
+        $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+          -javaagent:"$JAVA_AGENT_JAR" \
+          -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true \
+          -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+          -Dkaraf.home="$GERONIMO_HOME" \
+          -Dkaraf.base="$GERONIMO_HOME" \
+          -Djava.util.logging.config.file=$GERONIMO_HOME/etc/java.util.logging.properties
\
+          -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+          -Djava.ext.dirs="$EXT_DIRS" \
+          -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+          -classpath "$CLASSPATH" \
+          org.apache.geronimo.cli.daemon.DaemonCLI $LONG_OPT "$@" \
+          >> $GERONIMO_OUT 2>&1 &
+          echo ""
+          echo "Geronimo started in background. PID: $!"
+          if [ ! -z "$GERONIMO_PID" ]; then
+            echo $! > $GERONIMO_PID
+          fi
+      else
+        $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+          -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true \
+          -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+          -Dkaraf.home="$GERONIMO_HOME" \
+          -Dkaraf.base="$GERONIMO_HOME" \
+          -Djava.util.logging.config.file=$GERONIMO_HOME/etc/java.util.logging.properties
\
+          -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+          -Djava.ext.dirs="$EXT_DIRS" \
+          -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+          -classpath "$CLASSPATH" \
+          org.apache.geronimo.cli.daemon.DaemonCLI $LONG_OPT "$@" \
+          >> $GERONIMO_OUT 2>&1 &
+          echo ""
+          echo "Geronimo started in background. PID: $!"
+          if [ ! -z "$GERONIMO_PID" ]; then
+            echo $! > $GERONIMO_PID
+          fi
+      fi
   fi
+  
 
 elif [ "$1" = "stop" ] ; then
   shift

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat?rev=1032465&r1=1032464&r2=1032465&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
(original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
Mon Nov  8 05:56:56 2010
@@ -294,7 +294,18 @@ shift
 @REM use long format of startup progress to be consistent with
 @REM the unix version of the start processing
 set _LONG_OPT=--long
+if ""%1""==""--help"" goto setHelp
+if ""%1""==""-h"" goto setHelp
+if ""%1""==""-help"" goto setHelp
+goto setNonHelp
+:setHelp
+@REM print help information in current window
+set _EXECJAVA=%_RUNJAVA%
+goto setHelpEnd
+:setNonHelp
+@REM if it is not to print help information, open another window
 set _EXECJAVA=start "Geronimo Application Server" /d"%GERONIMO_HOME%\bin" %GERONIMO_WIN_START_ARGS%
%_RUNJAVA%
+:setHelpEnd
 set CONSOLE_OPTS=-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
 goto execCmd
 



Mime
View raw message