This is an automated email from the ASF dual-hosted git repository.
flange pushed a commit to branch karaf-4.0.x
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/karaf-4.0.x by this push:
new e2d0fe7 [KARAF-5886] Improve setting LD_LIBRARY_PATH
e2d0fe7 is described below
commit e2d0fe71d12fbe92c3774dc9eba56e3044f1b2c7
Author: Fabian Lange <[email protected]>
AuthorDate: Tue Sep 4 16:21:10 2018 +0200
[KARAF-5886] Improve setting LD_LIBRARY_PATH
---
.../base/src/main/filtered-resources/resources/bin/client | 10 +++++++---
.../base/src/main/filtered-resources/resources/bin/instance | 8 ++++++--
.../base/src/main/filtered-resources/resources/bin/shell | 8 ++++++--
.../features/base/src/main/resources/resources/bin/karaf | 6 +++++-
4 files changed, 24 insertions(+), 8 deletions(-)
diff --git
a/assemblies/features/base/src/main/filtered-resources/resources/bin/client
b/assemblies/features/base/src/main/filtered-resources/resources/bin/client
index 32a56e6..b12d480 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/client
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/client
@@ -99,7 +99,7 @@ unlimitFD() {
# Increase the maximum file descriptors if we can
if [ "$os400" = "false" ] && [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
- if [ "$MAX_FD_LIMIT" != 'unlimited' ]; then
+ if [ "$MAX_FD_LIMIT" != 'unlimited' ]; then
if [ $? -eq 0 ]; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
# use the system max
@@ -122,7 +122,7 @@ locateHome() {
if [ "x$KARAF_HOME" != "x" ]; then
warn "Ignoring predefined value for KARAF_HOME"
fi
-
+
# In POSIX shells, CDPATH may cause cd to write to stdout
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -164,7 +164,11 @@ locateEtc() {
setupNativePath() {
# Support for loading native libraries
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$KARAF_BASE/lib:$KARAF_HOME/lib"
+ if [ "x${LD_LIBRARY_PATH}" != "x" ]; then
+
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${KARAF_BASE}/lib:${KARAF_HOME}/lib"
+ else
+ LD_LIBRARY_PATH="${KARAF_BASE}/lib:${KARAF_HOME}/lib"
+ fi
# For Cygwin, set PATH from LD_LIBRARY_PATH
if $cygwin; then
diff --git
a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
index 0a82076..aa4bc58 100755
---
a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
+++
b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
@@ -115,7 +115,7 @@ unlimitFD() {
# Increase the maximum file descriptors if we can
if [ "$os400" = "false" ] && [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
- if [ "$MAX_FD_LIMIT" != 'unlimited' ]; then
+ if [ "$MAX_FD_LIMIT" != 'unlimited' ]; then
if [ $? -eq 0 ]; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
# use the system max
@@ -180,7 +180,11 @@ locateEtc() {
setupNativePath() {
# Support for loading native libraries
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$KARAF_BASE/lib:$KARAF_HOME/lib"
+ if [ "x${LD_LIBRARY_PATH}" != "x" ]; then
+
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${KARAF_BASE}/lib:${KARAF_HOME}/lib"
+ else
+ LD_LIBRARY_PATH="${KARAF_BASE}/lib:${KARAF_HOME}/lib"
+ fi
# For Cygwin, set PATH from LD_LIBRARY_PATH
if $cygwin; then
diff --git
a/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
b/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
index 4a3d137..050c506 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
@@ -99,7 +99,7 @@ unlimitFD() {
# Increase the maximum file descriptors if we can
if [ "$os400" = "false" ] && [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
- if [ "$MAX_FD_LIMIT" != 'unlimited' ]; then
+ if [ "$MAX_FD_LIMIT" != 'unlimited' ]; then
if [ $? -eq 0 ]; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
# use the system max
@@ -164,7 +164,11 @@ locateEtc() {
setupNativePath() {
# Support for loading native libraries
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$KARAF_BASE/lib:$KARAF_HOME/lib"
+ if [ "x${LD_LIBRARY_PATH}" != "x" ]; then
+
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${KARAF_BASE}/lib:${KARAF_HOME}/lib"
+ else
+ LD_LIBRARY_PATH="${KARAF_BASE}/lib:${KARAF_HOME}/lib"
+ fi
# For Cygwin, set PATH from LD_LIBRARY_PATH
if $cygwin; then
diff --git a/assemblies/features/base/src/main/resources/resources/bin/karaf
b/assemblies/features/base/src/main/resources/resources/bin/karaf
index c157a7a..284c4c0 100755
--- a/assemblies/features/base/src/main/resources/resources/bin/karaf
+++ b/assemblies/features/base/src/main/resources/resources/bin/karaf
@@ -177,7 +177,11 @@ locateEtc() {
setupNativePath() {
# Support for loading native libraries
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${KARAF_BASE}/lib:${KARAF_HOME}/lib"
+ if [ "x${LD_LIBRARY_PATH}" != "x" ]; then
+
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${KARAF_BASE}/lib:${KARAF_HOME}/lib"
+ else
+ LD_LIBRARY_PATH="${KARAF_BASE}/lib:${KARAF_HOME}/lib"
+ fi
# For Cygwin, set PATH from LD_LIBRARY_PATH
if ${cygwin}; then