karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject [2/2] karaf git commit: KARAF-4526 : System scripts : Solaris SMS sevice not started if path contains spaces
Date Mon, 16 May 2016 01:38:59 GMT
KARAF-4526 : System scripts : Solaris SMS sevice not started if path contains spaces


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

Branch: refs/heads/master
Commit: 4bf12a7a6ac0505376f83e01c95d826fb81275b9
Parents: 1fff013
Author: lburgazzoli <lburgazzoli@gmail.com>
Authored: Fri May 13 12:52:26 2016 +0200
Committer: lburgazzoli <lburgazzoli@gmail.com>
Committed: Fri May 13 12:52:26 2016 +0200

----------------------------------------------------------------------
 .../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/4bf12a7a/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/4bf12a7a/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