geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r745171 - /geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/contents/bin/geronimo.sh
Date Tue, 17 Feb 2009 17:49:47 GMT
Author: dwoods
Date: Tue Feb 17 17:49:47 2009
New Revision: 745171

URL: http://svn.apache.org/viewvc?rev=745171&view=rev
Log:
GERONIMO-4389 Can't start server when install it in a directory containing space.  Patch from
Jack Cai to fix an issue with the javaagent settings on Unix/Linux/Mac.

Modified:
    geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/contents/bin/geronimo.sh

Modified: geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/contents/bin/geronimo.sh
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/contents/bin/geronimo.sh?rev=745171&r1=745170&r2=745171&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/contents/bin/geronimo.sh
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate/src/main/underlay/contents/bin/geronimo.sh
Tue Feb 17 17:49:47 2009
@@ -273,12 +273,7 @@
 fi
 
 # Setup the Java programming language agent
-JAVA_AGENT_JAR="\"$GERONIMO_HOME/bin/jpa.jar\""
-if [ -f "$JAVA_AGENT_JAR" ]; then
-    JAVA_AGENT_OPTS="-javaagent:$JAVA_AGENT_JAR"
-else
-    JAVA_AGENT_OPTS=""
-fi
+JAVA_AGENT_JAR="$GERONIMO_HOME/bin/jpa.jar"
 
 if [ "$1" = "debug" ] ; then
   if $os400; then
@@ -302,30 +297,54 @@
 
 elif [ "$1" = "run" ]; then
   shift
-  exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
-    $JAVA_AGENT_OPTS \
-    -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
-    -Djava.endorsed.dirs="$ENDORSED_DIRS" \
-    -Djava.ext.dirs="$EXT_DIRS" \
-    -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
-    -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@"
+  if [ -f "$JAVA_AGENT_JAR" ]; then
+      exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+        -javaagent:"$JAVA_AGENT_JAR" \
+        -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+        -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+        -Djava.ext.dirs="$EXT_DIRS" \
+        -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+        -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@"
+  else
+      exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+        -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+        -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+        -Djava.ext.dirs="$EXT_DIRS" \
+        -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+        -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@"
+  fi
 
 elif [ "$1" = "start" ] ; then
   shift
   touch "$GERONIMO_OUT"
-  $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
-    $JAVA_AGENT_OPTS \
-    -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
-    -Djava.endorsed.dirs="$ENDORSED_DIRS" \
-    -Djava.ext.dirs="$EXT_DIRS" \
-    -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
-    -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@" \
-    >> $GERONIMO_OUT 2>&1 &
-    echo ""
-    echo "Geronimo started in background. PID: $!"
-    if [ ! -z "$GERONIMO_PID" ]; then
-      echo $! > $GERONIMO_PID
-    fi
+  if [ -f "$JAVA_AGENT_JAR" ]; then
+      $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+        -javaagent:"$JAVA_AGENT_JAR" \
+        -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+        -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+        -Djava.ext.dirs="$EXT_DIRS" \
+        -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+        -jar "$GERONIMO_HOME"/bin/server.jar $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 \
+        -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+        -Djava.endorsed.dirs="$ENDORSED_DIRS" \
+        -Djava.ext.dirs="$EXT_DIRS" \
+        -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
+        -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@" \
+        >> $GERONIMO_OUT 2>&1 &
+        echo ""
+        echo "Geronimo started in background. PID: $!"
+        if [ ! -z "$GERONIMO_PID" ]; then
+          echo $! > $GERONIMO_PID
+        fi
+  fi
 
 elif [ "$1" = "stop" ] ; then
   shift



Mime
View raw message