karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: svn commit: r1388334 - /karaf/branches/karaf-2.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
Date Fri, 21 Sep 2012 07:15:30 GMT
No, it depends of the platform (readlink is on /usr/bin on Linux, in 
/usr/local/bin of some other Linux, on /usr/bin on Solaris, etc ;)).

Another user proposed to use command -v to find the readlink location. 
I'm testing if command is available by default on all Unix platforms.

Regards
JB

On 09/21/2012 09:12 AM, Dan Tran wrote:
> I think it should be /usr/bin/readlink
>
> -D
>
> On Thu, Sep 20, 2012 at 10:57 PM,  <jbonofre@apache.org> wrote:
>> Author: jbonofre
>> Date: Fri Sep 21 05:57:12 2012
>> New Revision: 1388334
>>
>> URL: http://svn.apache.org/viewvc?rev=1388334&view=rev
>> Log:
>> [KARAF-1756] Update readlink test to work with "all" Unix
>>
>> Modified:
>>      karaf/branches/karaf-2.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
>>
>> Modified: karaf/branches/karaf-2.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
>> URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service?rev=1388334&r1=1388333&r2=1388334&view=diff
>> ==============================================================================
>> --- karaf/branches/karaf-2.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
(original)
>> +++ karaf/branches/karaf-2.2.x/shell/wrapper/src/main/resources/org/apache/karaf/shell/wrapper/unix/karaf-service
Fri Sep 21 05:57:12 2012
>> @@ -18,7 +18,7 @@
>>   # ------------------------------------------------------------------------
>>
>>   # If not set, try to determine the JAVA_HOME using the JDK and fall back to JRE
>> -if [ `which readlink` ]; then
>> +if [ -x /bin/readlink ]; then
>>     [ -z $JAVA_HOME ] && [ -x /usr/bin/javac ] && export JAVA_HOME="$(readlink
-f /usr/bin/javac | sed 's:/bin/javac::')"
>>     [ -z $JAVA_HOME ] && [ -x /usr/bin/java ] && export JAVA_HOME="$(readlink
-f /usr/bin/java | sed 's:/bin/java::')"
>>   fi
>>
>>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message