[jboss-cvs] JBossAS SVN: r109821 - branches/JBPAPP_5_1/server/src/bin.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Dec 10 07:02:43 EST 2010


Author: mladen.turk at jboss.com
Date: 2010-12-10 07:02:43 -0500 (Fri, 10 Dec 2010)
New Revision: 109821

Modified:
   branches/JBPAPP_5_1/server/src/bin/jboss_init_solaris.sh
Log:
JBPAPP-4434 Support multiple instances.

Modified: branches/JBPAPP_5_1/server/src/bin/jboss_init_solaris.sh
===================================================================
--- branches/JBPAPP_5_1/server/src/bin/jboss_init_solaris.sh	2010-12-10 11:36:34 UTC (rev 109820)
+++ branches/JBPAPP_5_1/server/src/bin/jboss_init_solaris.sh	2010-12-10 12:02:43 UTC (rev 109821)
@@ -60,7 +60,9 @@
 # sets global isJBossRunningPid with 1st process id if it is running 
 isJBossRunning()
 {
-    JBossHome=$2 JBossUserId=$1 instance=$3
+    JBossUserId=$1
+    JBossHome=$2
+    JBossInstance=$3
     # Note that we don't check $instance, as it will be truncated in
     # the -o args output below
 
@@ -73,10 +75,13 @@
 
     # Find java process with one of the above processes as parent
     for JBossPid in ${isJBossRunningPid}; do
-      isJBossRunningPid=`ps -u ${JBossUserId} -o pid -o args -o ppid | \
+      isPidRunning=`ps -u ${JBossUserId} -o pid -o args -o ppid | \
         awk '{if ($2 ~ /java$/ && $NF ~ /^'${JBossPid}'$/) print $1}'`
-      if [ "x${isJBossRunningPid}" != "x" ]; then
-	return 0
+      if [ "x${isPidRunning}" != "x" ]; then
+        args=`pargs -l ${JBossPid}`
+        test "x${args}" = "x" && return 0
+        inst=`echo ${args} | grep "\-c ${JBossInstance}" 2>/dev/null`
+        test "x${inst}" = "x" && return 0
       fi
     done
     return 1


Property changes on: branches/JBPAPP_5_1/server/src/bin/jboss_init_solaris.sh
___________________________________________________________________
Name: svn:executable
   + *



More information about the jboss-cvs-commits mailing list