[ https://issues.apache.org/jira/browse/HADOOP-7089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978165#action_12978165 ]
Allen Wittenauer commented on HADOOP-7089: ------------------------------------------ readlink is definitely tricky from a portability perspective; it is fairly recent as far as the commercial OSes go. [I think it was added in AIX 7, but maybe Stephen or someone else can confirm since I no longer have access to an AIX machine. On Solaris, GNU readlink was added in either 10 or NV, IIRC.] Also, with the change to use BASH_SOURCE, is cd+pwd still super fragile? It may not get it 100% correct, but does it get it 'correct enough'? Another option might be to use file -h, but I'm not certain how portable that is either. Since we require bash, there is also the (built-in only!) pwd -P. > Use readlink to get absolute paths in the scripts > -------------------------------------------------- > > Key: HADOOP-7089 > URL: https://issues.apache.org/jira/browse/HADOOP-7089 > Project: Hadoop Common > Issue Type: Improvement > Components: scripts > Reporter: Eli Collins > Assignee: Eli Collins > Priority: Minor > Fix For: 0.22.0, 0.23.0 > > Attachments: hadoop-7089-1.patch, hadoop-7089-1.patch > > > The manual link resolution logic in bin/hadoop-config.sh can be replaced with > readlink -m -n. Ditto with other uses of cd + pwd to get an absolute path, > which can be fragile. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.