karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francois Papon <francois.pa...@openobject.fr>
Subject Re: [4.2.0.M1] - Startup failed
Date Thu, 09 Nov 2017 06:00:22 GMT
I tested using "cut" for evaluate the MAJOR_VERSION and it work's with
bash, dash, sh :

File bin/inc :

method checkJvmVersion() line 218

MAJOR_VERSION=$("${JAVA}" -version 2>&1 \
        |awk -F '"' '/version/ {print $2}' \
        |cut -b 1)
    if [ "${MAJOR_VERSION}" -ge "9" ]; then
       VERSION=90
    fi

method setupDefaults() line 268 :

MAJOR_VERSION=$("${JAVA}" -version 2>&1 |awk -F '"' '/version/ {print
$2}' | cut -b 1)
        if [ "${MAJOR_VERSION}" -ge "9" ]; then
           VERSION=90
        fi


Le 09/11/2017 à 01:26, Francois Papon a écrit :
> It's the substring method that it's not supported by dash and ksh, I
> change the header of the karaf.sh file to force the shell : !/bin/bash
>
> Le 09/11/2017 à 01:02, Francois Papon a écrit :
>>
>> This expression fail with dash but work with bash :
>>
>> line 218 and 268 in bin/inc
>>
>> if [ "${MAJOR_VERSION:0:1}" -ge "9" ]; then
>>
>>
>> Le 09/11/2017 à 00:27, Jean-Baptiste Onofré a écrit :
>>> Weird. Let me double check.
>>>
>>> Regards
>>> JB
>>> On Nov 8, 2017, at 21:26, Francois Papon
>>> <francois.papon@openobject.fr <mailto:francois.papon@openobject.fr>>
>>> wrote:
>>>
>>>     I never change it, may be a Debian upgrade.
>>>
>>>     But I work with other Karaf version
>>>
>>>
>>>     Le 09/11/2017 à 00:23, Jean-Baptiste Onofré a écrit :
>>>>     Bash is not your default shell ?
>>>>     On Nov 8, 2017, at 21:22, Francois Papon <
>>>>     francois.papon@openobject.fr
>>>>     <mailto:francois.papon@openobject.fr>> wrote:
>>>>
>>>>         I find a work around :
>>>>
>>>>         |readlink -f $(which sh)/bin/dash sh ./bin/karaf don't work
>>>>         but bash ./bin/karaf work |
>>>>
>>>>
>>>>         Le 09/11/2017 à 00:20, Jean-Baptiste Onofré a écrit :
>>>>>         Let me try to reproduce. I'm using Oracle jdk. So let me
>>>>>         try with openjdk.
>>>>>
>>>>>         Regards
>>>>>         JB
>>>>>         On Nov 8, 2017, at 21:17, Francois Papon <
>>>>>         francois.papon@openobject.fr
>>>>>         <mailto:francois.papon@openobject.fr>> wrote:
>>>>>
>>>>>             I had tested on standard Debian shell, terminator and
>>>>>             outside gnome (tty)
>>>>>
>>>>>
>>>>>             Le 09/11/2017 à 00:09, Jean-Baptiste Onofré a écrit :
>>>>>>             Hmm. What's the shell ?
>>>>>>
>>>>>>             It works on my machines.
>>>>>>
>>>>>>             Regards
>>>>>>             JB
>>>>>>             On Nov 8, 2017, at 21:03, Francois Papon <
>>>>>>             francois.papon@openobject.fr
>>>>>>             <mailto:francois.papon@openobject.fr>> wrote:
>>>>>>
>>>>>>                 Hi,
>>>>>>
>>>>>>                 When I launch Karaf I've got this error :
>>>>>>
>>>>>>                 ./bin/karaf: 218: ./bin/karaf: Bad substitution
>>>>>>
>>>>>>
>>>>>>                 Karaf version : 4.2.0.M1
>>>>>>
>>>>>>                 Karaf source : download from Karaf website
>>>>>>                 (http://www.apache.org/dyn/closer.lua/karaf/4.2.0.M1/apache-karaf-4.2.0.M1.tar.gz)
>>>>>>
>>>>>>                 Integrity check : ok
>>>>>>
>>>>>>                 I patch the ./bin/inc file with [KARAF-5466] and
>>>>>>                 [KARAF-5467]
>>>>>>
>>>>>>                 I also try with the last success jenkins build :
>>>>>>                 apache-karaf-4.2.0-20171106.203358-433.tar.gz
>>>>>>                 <https://builds.apache.org/view/K/view/Karaf/job/karaf-master/4754/org.apache.karaf$apache-karaf/artifact/org.apache.karaf/apache-karaf/4.2.0-20171106.203358-433/apache-karaf-4.2.0-20171106.203358-433.tar.gz>
>>>>>>
>>>>>>                 JVM version :
>>>>>>
>>>>>>                 java version "9.0.1"
>>>>>>                 Java(TM) SE Runtime Environment (build 9.0.1+11)
>>>>>>                 Java HotSpot(TM) 64-Bit Server VM (build
>>>>>>                 9.0.1+11, mixed mode)
>>>>>>
>>>>>>                 (I also try with openjdk-9, java-oracle-8, openjdk-8)
>>>>>>
>>>>>>                 OS : Debian stable : 4.9.0-4-amd64 #1 SMP Debian
>>>>>>                 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
>>>>>>
>>>>>
>>>>
>>>
>>
>


Mime
View raw message