You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Siddhartha (JIRA)" <ji...@apache.org> on 2016/03/02 08:42:18 UTC

[jira] [Updated] (ZOOKEEPER-2377) zkServer.sh should resolve canonical path from symlinks

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Siddhartha updated ZOOKEEPER-2377:
----------------------------------
    Attachment: ZOOKEEPER-2377.patch

Thank you [~rgs] [~eribeiro].

I think it is better to rely on an actual readlink command than hack one ourselves and miss subtle edge cases (eg. symlink cycles).

I have modified the patch so that readlink works only when -f is available, otherwise it falls back to simple ls -l, which can do the same work as a simple readlink.

[~eribeiro], please confirm ls -l works in OSX



> zkServer.sh should resolve canonical path from symlinks
> -------------------------------------------------------
>
>                 Key: ZOOKEEPER-2377
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2377
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 3.4.8
>         Environment: Centos 6
>            Reporter: Siddhartha
>            Priority: Minor
>         Attachments: ZOOKEEPER-2377.patch, ZOOKEEPER-2377.patch
>
>
> If zkServer.sh is started from a symlink, it is not able to correctly source the other scripts because it looks in the wrong path.
> Attached patch fixes this by first resolving absolute path to the script.



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