[KARAF-5304] Update karaf script to be compliant with AIX

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

Branch: refs/heads/model_features
Commit: b7bdb359499d7fd9db09847e078d20cb461c2ace
Parents: 244fafd
Author: Jean-Baptiste Onofré <jbono...@apache.org>
Authored: Fri Aug 11 15:00:57 2017 +0200
Committer: Jean-Baptiste Onofré <jbono...@apache.org>
Committed: Fri Aug 11 15:01:34 2017 +0200

----------------------------------------------------------------------
 .../base/src/main/filtered-resources/resources/bin/karaf         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/b7bdb359/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
----------------------------------------------------------------------
diff --git 
a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf 
b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
index dc022bc..048b344 100644
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
@@ -89,10 +89,10 @@ checkRootInstance() {
       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}" > /dev/null
+          if ps -p "${ROOT_INSTANCE_PID}" > /dev/null
           then
               MAIN=org.apache.karaf.main.Main
-              PID_COMMAND=$(ps p "${ROOT_INSTANCE_PID}" o args | sed 1d)
+              PID_COMMAND=$(ps -p "${ROOT_INSTANCE_PID}" o args | sed 1d)
               if [ "${PID_COMMAND#*$MAIN}" != "$PID_COMMAND" ]; then
                 ROOT_INSTANCE_RUNNING=true
               fi

Reply via email to