Repository: karaf Updated Branches: refs/heads/karaf-2.x 40ad6256a -> 270112db6
[KARAF-3461] Be able to use a custom KARAF_HOME Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/270112db Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/270112db Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/270112db Branch: refs/heads/karaf-2.x Commit: 270112db69e935175783dcedd9040f93209a1b0b Parents: 40ad625 Author: Jean-Baptiste Onofré <[email protected]> Authored: Tue Apr 21 22:15:18 2015 +0200 Committer: Jean-Baptiste Onofré <[email protected]> Committed: Tue Apr 21 22:15:18 2015 +0200 ---------------------------------------------------------------------- .../src/main/distribution/unix-shell/bin/karaf | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/270112db/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf ---------------------------------------------------------------------- diff --git a/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf b/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf index 5367061..ad09404 100755 --- a/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf +++ b/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf @@ -112,14 +112,12 @@ unlimitFD() { } locateHome() { - if [ "x$KARAF_HOME" != "x" ]; then - warn "Ignoring predefined value for KARAF_HOME" + if [ "x$KARAF_HOME" = "x" ]; then + # In POSIX shells, CDPATH may cause cd to write to stdout + (unset CDPATH) >/dev/null 2>&1 && unset CDPATH + KARAF_HOME=`cd "$DIRNAME/.."; pwd` fi - # In POSIX shells, CDPATH may cause cd to write to stdout - (unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - KARAF_HOME=`cd "$DIRNAME/.."; pwd` if [ ! -d "$KARAF_HOME" ]; then die "KARAF_HOME is not valid: $KARAF_HOME" fi
