karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject karaf git commit: KARAF-4413 : Can't start karaf on solaris 10
Date Fri, 11 Mar 2016 01:59:26 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-4.0.x a230fd70f -> bab51f8f6


KARAF-4413 : Can't start karaf on solaris 10

(cherry picked from commit efaccd969f79725eced2779f42adfbf67d90b855)


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/bab51f8f
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/bab51f8f
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/bab51f8f

Branch: refs/heads/karaf-4.0.x
Commit: bab51f8f6b8d4ed88a5d92c37f6478338430564d
Parents: a230fd7
Author: lburgazzoli <lburgazzoli@gmail.com>
Authored: Thu Mar 10 16:26:00 2016 +0100
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Fri Mar 11 09:59:28 2016 +0800

----------------------------------------------------------------------
 .../base/src/main/resources/resources/bin/karaf         | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/bab51f8f/assemblies/features/base/src/main/resources/resources/bin/karaf
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/resources/resources/bin/karaf b/assemblies/features/base/src/main/resources/resources/bin/karaf
index 17fd3c7..60a5931 100755
--- a/assemblies/features/base/src/main/resources/resources/bin/karaf
+++ b/assemblies/features/base/src/main/resources/resources/bin/karaf
@@ -326,13 +326,11 @@ setupDefaults() {
 
 checkRootInstance() {
    ROOT_INSTANCE_RUNNING=false
-   if [ -f "${KARAF_HOME}/instances/instance.properties" ]; 
-   then
-      ROOT_INSTANCE_PID=$(sed -n -e '/item.0.pid/ s/.*\= *//p' "${KARAF_HOME}/instances/instance.properties")
-      ROOT_INSTANCE_NAME=$(sed -n -e '/item.0.name/ s/.*\= *//p' "${KARAF_HOME}/instances/instance.properties")
-      if [ "$ROOT_INSTANCE_PID" -ne "0" ]; then 
-          if ps ax | grep -v grep | grep "$ROOT_INSTANCE_PID" > /dev/null
-          then
+   if [ -f "${KARAF_HOME}/instances/instance.properties" ]; then
+      ROOT_INSTANCE_PID=`sed -n -e '/item.0.pid/ s/.*\= *//p' "${KARAF_HOME}/instances/instance.properties"`
+      ROOT_INSTANCE_NAME=`sed -n -e '/item.0.name/ s/.*\= *//p' "${KARAF_HOME}/instances/instance.properties"`
+      if [ "$ROOT_INSTANCE_PID" -ne "0" ]; then
+          if [ `ps -p "$ROOT_INSTANCE_PID" 2> /dev/null | grep -c "$ROOT_INSTANCE_PID"
2> /dev/null` -eq '1' ]; then
               ROOT_INSTANCE_RUNNING=true
           fi
       fi


Mime
View raw message