[jboss-cvs] JBossAS SVN: r112564 - branches/JBPAPP_5_1/main/src/bin.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jan 9 01:37:51 EST 2012


Author: jiwils
Date: 2012-01-09 01:37:50 -0500 (Mon, 09 Jan 2012)
New Revision: 112564

Modified:
   branches/JBPAPP_5_1/main/src/bin/run.sh
Log:
Merging 5.1.3_interim changes: Fix JBPAPP-7454. Allow the specification of alternative run.conf files via a --run-conf parameter to run.sh

Modified: branches/JBPAPP_5_1/main/src/bin/run.sh
===================================================================
--- branches/JBPAPP_5_1/main/src/bin/run.sh	2012-01-09 06:33:56 UTC (rev 112563)
+++ branches/JBPAPP_5_1/main/src/bin/run.sh	2012-01-09 06:37:50 UTC (rev 112564)
@@ -23,15 +23,28 @@
         if [ "$SWITCH" = "-c" ]; then
             eval JBOSSCONF=\$`expr $arg_count + 1`
             CONF_SPECIFIED=true
-            break
         fi
 
         echo "$SWITCH" | grep "^\-\-configuration=" > /dev/null
         if [ $? -eq 0 ]; then
             JBOSSCONF=`echo $SWITCH|sed 's/\-\-configuration=//'`
-            break
         fi
 
+        echo "$SWITCH" | grep "^\-Djboss.server.base.dir=" #> /dev/null
+        if [ $? -eq 0 ]; then
+            JBOSS_BASE_DIR=`echo $SWITCH|sed 's/\-Djboss.server.base.dir=//'`
+        fi
+
+	echo "$SWITCH" | grep "^--run-conf=" > /dev/null
+	if [ $? -eq 0 ]; then
+		RUN_CONF=`echo $SWITCH|sed 's/--run-conf=//'`
+
+		#rebuild the parameter list to drop this one
+		set -- `echo "$@" | sed "s!$SWITCH!!"`
+		eval SWITCH=\${$arg_count}
+		continue
+	fi
+
         arg_count=`expr $arg_count + 1`
         eval SWITCH=\${$arg_count}
 done
@@ -90,7 +103,9 @@
 # Read an optional running configuration file
 if [ "x$RUN_CONF" = "x" ]; then
 
-    if [ ! -z "$JBOSSCONF" ] && [ -f "$DIRNAME/../server/$JBOSSCONF/run.conf" ]; then
+    if [ ! -z "$JBOSSCONF" ] && [ -f "$JBOSS_BASE_DIR/$JBOSSCONF/run.conf" ]; then
+        RUN_CONF="$JBOSS_BASE_DIR/$JBOSSCONF/run.conf"
+    elif [ ! -z "$JBOSSCONF" ] && [ -f "$DIRNAME/../server/$JBOSSCONF/run.conf" ]; then
         RUN_CONF="$DIRNAME/../server/$JBOSSCONF/run.conf"
     else
         RUN_CONF="$DIRNAME/run.conf"


Property changes on: branches/JBPAPP_5_1/main/src/bin/run.sh
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/JBPAPP_4_2_0_GA_CP/system/src/bin/run.sh:108548
   + /branches/JBPAPP_4_2_0_GA_CP/system/src/bin/run.sh:108548
/branches/JBPAPP_5_1_3_interim/main/src/bin/run.sh:112383,112510



More information about the jboss-cvs-commits mailing list