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-4526 : System scripts : Solaris SMS sevice not started if path contains spaces
Date Mon, 16 May 2016 02:37:57 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-4.0.x 0e8cfd9a9 -> 3bfb1b35b


KARAF-4526 : System scripts : Solaris SMS sevice not started if path contains spaces

(cherry picked from commit 4bf12a7a6ac0505376f83e01c95d826fb81275b9)


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

Branch: refs/heads/karaf-4.0.x
Commit: 3bfb1b35b6b457cdca1a4b9d3424be0f021e6c24
Parents: 0e8cfd9
Author: lburgazzoli <lburgazzoli@gmail.com>
Authored: Fri May 13 12:52:26 2016 +0200
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Mon May 16 10:37:42 2016 +0800

----------------------------------------------------------------------
 .../bin/contrib/karaf-service-template.solaris-smf |  2 +-
 .../resources/bin/contrib/karaf-service.sh         | 17 ++++++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/3bfb1b35/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service-template.solaris-smf
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service-template.solaris-smf
b/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service-template.solaris-smf
index 22c267e..d6751ab 100644
--- a/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service-template.solaris-smf
+++ b/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service-template.solaris-smf
@@ -38,7 +38,7 @@
         <method_context>
             <method_credential user='${KARAF_SERVICE_USER}' group='${KARAF_SERVICE_GROUP}'/>
             <method_environment>
-                <envvar name="JAVA_HOME" value="/usr/java"/>
+                <envvar name="JAVA_HOME" value="${JAVA_HOME}"/>
             </method_environment>
         </method_context>
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/3bfb1b35/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service.sh
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service.sh
b/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service.sh
index f8a1998..0c47886 100755
--- a/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service.sh
+++ b/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service.sh
@@ -137,7 +137,22 @@ function generate_service_descriptor {
 if [[ ! $KARAF_SERVICE_TEMPLATE ]]; then
     case $(uname | tr [:upper:] [:lower:]) in
         sunos)
-            # smc vs initv
+            # add KARAF_ENV vars to envirioment
+            for var in "${KARAF_ENV[@]}"; do
+                export $var
+            done
+
+            # Default java path if not set
+            if [[ ! $JAVA_HOME ]]; then
+                export JAVA_HOME=/usr/java
+            fi
+
+            # escape spaces in path
+            export KARAF_SERVICE_PATH="$(echo $KARAF_SERVICE_PATH | sed 's/ /\\ /g')"
+            export KARAF_SERVICE_DATA="$(echo $KARAF_SERVICE_DATA | sed 's/ /\\ /g')"
+            export KARAF_SERVICE_CONF="$(echo $KARAF_SERVICE_CONF | sed 's/ /\\ /g')"
+            export KARAF_SERVICE_PIDFILE="$(echo $KARAF_SERVICE_PIDFILE | sed 's/ /\\ /g')"
+            
             generate_service_descriptor \
                 "$SOLARIS_SMF_TEMPLATE" \
                 "${PWD}/${KARAF_SERVICE_NAME}.xml"


Mime
View raw message