File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,8 @@ Release 0.22.0 - Unreleased
443443 HADOOP-7101. UserGroupInformation.getCurrentUser() fails when called from
444444 non-Hadoop JAAS context. (todd)
445445
446+ HADOOP-7089. Fix link resolution logic in hadoop-config.sh. (eli)
447+
446448Release 0.21.1 - Unreleased
447449
448450 IMPROVEMENTS
Original file line number Diff line number Diff line change 1717# should not be executable directly
1818# also should not be passed any arguments, since we need original $*
1919
20- # resolve links - $0 may be a softlink
21-
20+ # Resolve links ($0 may be a softlink) and convert a relative path
21+ # to an absolute path. NB: The -P option requires bash built-ins
22+ # or POSIX:2001 compliant cd and pwd.
2223this=" ${BASH_SOURCE-$0 } "
23- while [ -h " $this " ]; do
24- ls=` ls -ld " $this " `
25- link=` expr " $ls " : ' .*-> \(.*\)$' `
26- if expr " $link " : ' .*/.*' > /dev/null; then
27- this=" $link "
28- else
29- this=` dirname " $this " ` /" $link "
30- fi
31- done
32-
33- # convert relative path to absolute path
34- common_bin=` dirname " $this " `
35- script=` basename " $this " `
36- common_bin=` cd " $common_bin " ; pwd`
24+ common_bin=$( cd -P -- " $( dirname -- " $this " ) " && pwd -P)
25+ script=" $( basename -- " $this " ) "
3726this=" $common_bin /$script "
3827
3928# the root of the Hadoop installation
You can’t perform that action at this time.
0 commit comments