New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KARAF-4564 Can't start karaf using symbolic link #196
Conversation
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
|
The pull request isn't complete as it should take care of the .bat scripts a well. But I wasn't able to figure it out for the batch script. |
|
Unfortunately, I don't think it's a good idea to use Maybe |
|
Even better, we can test if |
|
Sure, would you like me to test it to make sure it solves the issue the same way?
|
|
That would be great ! Thanks ! |
|
I confirm |
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
|
As said in my previous comment, even if For instance, something like |
|
So would this be more appropriate? But if readlink doesn't exist it will trigger a warning: |
|
I would do more something like: |
|
I updated the PR with: It works fine. Rebasing and merging. |
|
@jbonofre Thank you for such a great support! |
|
@adetalhouet you are welcome ! My pleasure ! |
When executing the karaf script, it gets the DIRNAME based on $0 which is the path used to start the script. This DIRNAME is then used to set the KARAF_HOME and multiple other KARAF_* env variables.
Using a symbolic link, you would have, for instance, usr/bin/karaf redirecting to /opt/opendaylight/bin/karaf. So $0 would be usr/bin and not /opt/opendaylight/bin so the locateHome function isn't setting the right path for the KARAF_HOME.
This ends up failing to start ODL with following
ERROR: Error: Could not find or load main class org.apache.karaf.main.Main
Signed-off-by: Alexis de Talhouët adetalhouet@inocybe.com