[jboss-cvs] JBossAS SVN: r89465 - branches/JBPAPP_4_2_0_GA_CP/server/src/bin.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 27 10:49:35 EDT 2009


Author: jfrederic.clere at jboss.com
Date: 2009-05-27 10:49:35 -0400 (Wed, 27 May 2009)
New Revision: 89465

Modified:
   branches/JBPAPP_4_2_0_GA_CP/server/src/bin/jboss_init_solaris.sh
Log:
Correction corresponding to the customer comment.


Modified: branches/JBPAPP_4_2_0_GA_CP/server/src/bin/jboss_init_solaris.sh
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/server/src/bin/jboss_init_solaris.sh	2009-05-27 14:48:06 UTC (rev 89464)
+++ branches/JBPAPP_4_2_0_GA_CP/server/src/bin/jboss_init_solaris.sh	2009-05-27 14:49:35 UTC (rev 89465)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/bash
 #
 # $Id: jboss_init_solaris.sh 57106 2006-09-23 14:09:54Z dimitris at jboss.org $
 #
@@ -101,12 +101,24 @@
 isJBossRunning()
 {
     JBossHome=$2 JBossUserId=$1 instance=$3
-    isJBossRunningPid=0
     # pipeline reads 1st jboss pid if it is running for user, jboss home, and instance
-    ps -u $JBossUserId -o pid -o args| 
-    grep "$JBossHome" | grep -v "grep" | grep "program.name=run.sh" > /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
 }
 
 #USAGE: isUserOK




More information about the jboss-cvs-commits mailing list