Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5406C17301 for ; Sun, 12 Apr 2015 18:31:13 +0000 (UTC) Received: (qmail 15606 invoked by uid 500); 12 Apr 2015 18:31:12 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 15504 invoked by uid 500); 12 Apr 2015 18:31:12 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 15216 invoked by uid 99); 12 Apr 2015 18:31:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Apr 2015 18:31:12 +0000 Date: Sun, 12 Apr 2015 18:31:12 +0000 (UTC) From: =?utf-8?Q?Jean-Baptiste_Onofr=C3=A9_=28JIRA=29?= To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work started] (KARAF-3461) bin/karaf doesn't use the provided KARAF_HOME MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KARAF-3461?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on KARAF-3461 started by Jean-Baptiste Onofr=C3=A9. --------------------------------------------------- > bin/karaf doesn't use the provided KARAF_HOME > --------------------------------------------- > > Key: KARAF-3461 > URL: https://issues.apache.org/jira/browse/KARAF-3461 > Project: Karaf > Issue Type: Improvement > Components: karaf-core > Reporter: Jean-Baptiste Onofr=C3=A9 > Assignee: Jean-Baptiste Onofr=C3=A9 > Fix For: 4.0.0, 2.4.2, 3.0.4 > > > Currently, if the user sets a KARAF_HOME env variable, Karaf doesn't use = it and display a warning: > {code} > locateHome() { > if [ "x$KARAF_HOME" !=3D "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 > KARAF_HOME=3D`cd "$DIRNAME/.."; pwd` > if [ ! -d "$KARAF_HOME" ]; then > die "KARAF_HOME is not valid: $KARAF_HOME" > fi > } > {code} > This behaviour prevents to place karaf script in /usr/bin for instance (o= r we have to use a symlink). > It's particulary interesting with docker.io images (where we can to place= karaf script directly in /bin for instance). > Actually, we should do something like: > {code} > locateHome() { > if [ "x$KARAF_HOME" =3D "x" ]; then > # In POSIX shells, CDPATH may cause cd to write to stdout > (unset CDPATH) >/dev/null 2>&1 && unset CDPATH > KARAF_HOME=3D`cd "$DIRNAME/.."; pwd` > fi > if [ ! -d "$KARAF_HOME" ]; then > die "KARAF_HOME is not valid: $KARAF_HOME" > fi > } > {code} > With this change, if the user sets KARAF_HOME, we use it, else we "fallba= ck" to define the KARAF_HOME relatively to DIRNAME. -- This message was sent by Atlassian JIRA (v6.3.4#6332)