You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2016/12/01 14:52:58 UTC

[jira] [Comment Edited] (KARAF-4564) Can't start karaf using symbolic link

    [ https://issues.apache.org/jira/browse/KARAF-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15712173#comment-15712173 ] 

Guillaume Nodet edited comment on KARAF-4564 at 12/1/16 2:52 PM:
-----------------------------------------------------------------

What if we replace {{readlink xxx}} with {{ls -l xxx | awk '\{print$NF\}'}} ?
I've tested on OSX and it works correctly...
Anyone care to try on AIX or linux ?

The related script would look like:
{code}
realpath() {
  OURPWD=${PWD}
  cd "$(dirname "${1}")"
  LINK=$(ls -l "$(basename "${1}")" | awk '{print$NF}')
  while [ "${LINK}" != "$(basename "${1}")" ]; do
    cd "$(dirname "${LINK}")"
    LINK=$(ls -l "$(basename "${1}")" | awk '{print$NF}')
  done
  REALPATH="${PWD}/$(basename "${1}")"
  cd "${OURPWD}"
  echo "${REALPATH}"
}
{code}


was (Author: gnt):
What if we replace {{readlink xxx}} with {{ls -l xxx | awk '\{print$NF\}'}} ?
I've tested on OSX and it works correctly...
Anyone care to try on AIX or linux ?

>  Can't start karaf using symbolic link
> --------------------------------------
>
>                 Key: KARAF-4564
>                 URL: https://issues.apache.org/jira/browse/KARAF-4564
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 3.0.6
>         Environment: Ubuntu (Linux vagrant 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux)
> OSX (Darwin inocybe.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep  1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64)
> Solaris (SunOS solaris11.3 5.11 11.3 i86pc i386 i86pc)
>            Reporter: Alexis de Talhouƫt
>             Fix For: 4.1.0, 3.0.7, 4.0.6
>
>
> When using a symbolic link to use the scripts defined here: https://github.com/apache/karaf/tree/karaf-3.0.6/assemblies/features/framework/src/main/filtered-resources/resources/bin e.g. karaf or client and so on, it's failing to start the container and show this error:
> Error: Could not find or load main class org.apache.karaf.main.Main
> This issue is related to the DIRNAME variable and the way it is setup.
> This bug has been found in OpenDaylight, here is the ticket with more information https://bugs.opendaylight.org/show_bug.cgi?id=6027
> I have also propose a candidate fix in ODL: https://git.opendaylight.org/gerrit/#/c/39982/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)