You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ge...@apache.org on 2013/08/02 12:09:41 UTC

svn commit: r1509601 - /karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service

Author: gertv
Date: Fri Aug  2 10:09:41 2013
New Revision: 1509601

URL: http://svn.apache.org/r1509601
Log:
KARAF-2424: Use ps -o comm in karaf-service script on Solaris

Modified:
    karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service

Modified: karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service?rev=1509601&r1=1509600&r2=1509601&view=diff
==============================================================================
--- karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service (original)
+++ karaf/branches/karaf-2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service Fri Aug  2 10:09:41 2013
@@ -358,7 +358,12 @@ getpid() {
                 #  common is during system startup after an unclean shutdown.
                 # The ps statement below looks for the specific wrapper command running as
                 #  the pid.  If it is not found then the pid file is considered to be stale.
-                pidtest=`$PSEXE -p $pid -o command | grep $WRAPPER_CMD | tail -1`
+                if [ "$DIST_OS" = "solaris" ]
+                then
+                    pidtest=`$PSEXE -p $pid -o comm | grep $WRAPPER_CMD | tail -1`
+                else
+                    pidtest=`$PSEXE -p $pid -o command | grep $WRAPPER_CMD | tail -1`
+                fi
                 if [ "X$pidtest" = "X" ]
                 then
                     # This is a stale pid file.