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

Pedro Giffuni commented on HADOOP-10797:
----------------------------------------

It is indeed better to use standard /bin/sh for non interactive strings and 
most linux distributions are following that policy:

https://wiki.ubuntu.com/DashAsBinSh

"We recommend that developers of shell scripts adhere to the POSIX standard, 
omitting those items flagged as XSI extensions. (This subset will be referred 
to as "POSIX shell" throughout the remainder of this document.) Doing so will 
improve portability to a variety of Unix systems, and will provide assurance 
that problems you encounter will be treated as bugs rather than as undocumented 
features! A special exception is that echo -n is guaranteed to be supported, 
although not other echo options (see below)."

FWIW, we did this for Apache OpenOffice and it was very useful to have the 
checkbashims script (from sourceforge).

> Hardcoded path to "bash" is not portable
> ----------------------------------------
>
>                 Key: HADOOP-10797
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10797
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.4.1
>            Reporter: Dmitry Sivachenko
>         Attachments: bash.patch
>
>
> Most of shell scripts use shebang ling in the following format:
> #!/usr/bin/env bash
> But some scripts contain hardcoded "/bin/bash" which is not portable.
> Please use #!/usr/bin/env bash instead for portability.
> PS: it would be much better to switch to standard Bourne Shell /bin/sh, do 
> these scripts really need bash?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to