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

Harsh J commented on HADOOP-8386:
---------------------------------

Hi Christopher,

Is it cause the default Ubuntu shell is dash 
(http://manpages.ubuntu.com/manpages/lucid/man1/dash.1.html doesn't prove it 
though)? We try to make sure the hadoop script runs as a bash script (via a 
shebang…), and rely on bash's default cd behavior to not cause this. Perhaps 
some environment specific item on your desktop has overriden the default 
behavior?

The cd builtin of bash does not print, nor has an option to do so (has -L and 
-P AFAIK, but neither enforces such a behavior). Must be some odd function 
wrapper, you can probably detect via "which cd" or "type cd"? What does it say?
                
> hadoop script doesn't work if 'cd' prints to stdout (default behavior in 
> Ubuntu)
> --------------------------------------------------------------------------------
>
>                 Key: HADOOP-8386
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8386
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 1.0.2
>         Environment: Ubuntu
>            Reporter: Christopher Berner
>         Attachments: hadoop.diff
>
>
> if the 'hadoop' script is run as 'bin/hadoop' on a distro where the 'cd' 
> command prints to stdout, the script will fail due to this line: 'bin=`cd 
> "$bin"; pwd`'
> Workaround: execute from the bin/ directory as './hadoop'
> Fix: change that line to 'bin=`cd "$bin" > /dev/null; pwd`'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to