[jboss-cvs] JBossAS SVN: r100263 - branches/JBPAPP_5_0/main/src/bin.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 2 11:01:47 EST 2010
Author: miclark
Date: 2010-02-02 11:01:46 -0500 (Tue, 02 Feb 2010)
New Revision: 100263
Modified:
branches/JBPAPP_5_0/main/src/bin/run.sh
Log:
JBPAPP-2818: Applied patch from jira to allow overriding of bin/run.conf with server/<profile-dir>/run.conf
Modified: branches/JBPAPP_5_0/main/src/bin/run.sh
===================================================================
--- branches/JBPAPP_5_0/main/src/bin/run.sh 2010-02-02 15:54:46 UTC (rev 100262)
+++ branches/JBPAPP_5_0/main/src/bin/run.sh 2010-02-02 16:01:46 UTC (rev 100263)
@@ -11,6 +11,36 @@
PROGNAME=`basename $0`
GREP="grep"
+# Set conf if specified, else set to default
+JBOSSCONF="default"
+CONF_SPECIFIED=false
+
+arg_count=1
+eval SWITCH=\${$arg_count}
+while [ ! -z "$SWITCH" ]
+do
+
+ 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
+
+ arg_count=`expr $arg_count + 1`
+ eval SWITCH=\${$arg_count}
+done
+
+if [ x${CONF_SPECIFIED} = "xfalse" ]
+then
+ set -- "-c" ${JBOSSCONF} $@
+fi
+
# Use the maximum available, or set MAX_FD != -1 to use that
MAX_FD="maximum"
@@ -49,7 +79,12 @@
# Read an optional running configuration file
if [ "x$RUN_CONF" = "x" ]; then
- RUN_CONF="$DIRNAME/run.conf"
+
+ if [ ! -z "$JBOSSCONF" ] && [ -f "$DIRNAME/../server/$JBOSSCONF/run.conf" ]; then
+ RUN_CONF="$DIRNAME/../server/$JBOSSCONF/run.conf"
+ else
+ RUN_CONF="$DIRNAME/run.conf"
+ fi
fi
if [ -r "$RUN_CONF" ]; then
. "$RUN_CONF"
More information about the jboss-cvs-commits
mailing list