[jboss-cvs] JBossAS SVN: r89354 - trunk/server/src/bin.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 25 03:55:48 EDT 2009


Author: jfrederic.clere at jboss.com
Date: 2009-05-25 03:55:48 -0400 (Mon, 25 May 2009)
New Revision: 89354

Modified:
   trunk/server/src/bin/jboss_init_solaris.sh
Log:
Allow 2 instances to work correctly.
Note that /usr/ucb/ps belongs to SUNWscpu (which a SunOS 4.x compatibility package).
/usr/ucb/ps -awwx | grep $JBossHome | grep -v "grep"| grep -v "/bin/sh"| cut -c2-9 > /tmp/$$.jboss 
would work if this package is installled.


Modified: trunk/server/src/bin/jboss_init_solaris.sh
===================================================================
--- trunk/server/src/bin/jboss_init_solaris.sh	2009-05-25 07:52:28 UTC (rev 89353)
+++ trunk/server/src/bin/jboss_init_solaris.sh	2009-05-25 07:55:48 UTC (rev 89354)
@@ -102,12 +102,20 @@
 {
     JBossHome=$2 JBossUserId=$1 instance=$3
     # pipeline reads 1st jboss pid if it is running for user, jboss home, and instance
-    ps -u $JBossUserId -o pid -o args| 
-    grep "Dprogram.name=run.sh" | grep -v "grep" > /tmp/$$.jboss
+    ps -u $JBossUserId -o pid -o args |
+    grep "${JBossHome}"  | grep -v "grep" > /tmp/$$.jboss
     read isJBossRunningPid junk < /tmp/$$.jboss
     rm -f /tmp/$$.jboss
     if [ "x${isJBossRunningPid}" = "x" ]; then
       return 1
+    fi
+
+    ps -u $JBossUserId -o pid -o args -o ppid | 
+    grep "Dprogram.name=run.sh" | grep -v "grep" | grep ${isJBossRunningPid} > /tmp/$$.jboss
+    read isJBossRunningPid junk < /tmp/$$.jboss
+    rm -f /tmp/$$.jboss
+    if [ "x${isJBossRunningPid}" = "x" ]; then
+      return 1
     else
       return 0
     fi




More information about the jboss-cvs-commits mailing list