[PLUG] Advisability of changing shell redirect

Tim Wescott tim at wescottdesign.com
Wed Apr 28 18:57:27 UTC 2010


Tim wrote:
> Hey Tim,
>
>   
>> tim at servo:~/Downloads$ ./arm-2009q3-67-arm-none-linux-gnueabi.bin
>> The installer has detected that your system uses the dash shell
>> as /bin/sh.  This shell is not supported by the installer.
>> You can work around this problem by changing /bin/sh to be a
>> symbolic link to a supported shell such as bash.
>> For example, on Ubuntu systems, execute this shell command:
>>    % sudo dpkg-reconfigure -plow dash
>>    Install as /bin/sh? No
>> Please refer to the Getting Started guide for more information,
>> or contact CodeSourcery Support for assistance.
>> tim at servo:~/Downloads$
>>
>> Do I want to touch this?  Is this going to screw up _other_ software 
>> that may be looking for 'sh' to be a Dash shell command?  Or am I fairly 
>> safe playing with it?
>>
>> And do I want to just change the link manually, or do I want to use 
>> dpgk-reconfigure as they suggest?
>>     
>
>
> Debian actually uses bash for /bin/sh by default.  I personally always
> change this to dash.  /bin/sh is supposed to be a POSIX compliant
> shell, but bash always supports non-compliant syntax which causes some
> coders to write shell scripts with "bashisms" that aren't portable.  
>
> Also, bash is a memory hog like no other.  As DJB once said: "There
> are good interfaces and then there are user interfaces".  Bash is
> definitely a user interface.  So dash is both faster and keeps you
> honest by being POSIX compliant and restricting you to POSIX compliant
> syntax.
>
> The fact that this company requires /bin/sh to be bash means that
> they're writing bash scripts and sticking "#!/bin/sh" in the header
> instead of "#!/bin/bash".  A simple bug to fix on their end, but for
> some reason they expect users to change they way they operate to
> accommodate them.
>
> Summary:  That's really annoying, but it probably won't break anything
> to switch to bash, besides making your shell scripts run slower.
>   
I'm thinking that I'll just change the link, install the software, try 
it out, then change the link back -- in hopes that the only scripts that 
cause problems are in their install.

Damn but I wish I could find their source code.  "Open source" indeed.

-- 
Tim Wescott
Wescott Design Services
Voice: 503-631-7815
Cell:  503-349-8432
http://www.wescottdesign.com





More information about the PLUG mailing list