Dash as default shell

Ralf Corsepius rc040203 at freenet.de
Thu Oct 2 07:00:50 UTC 2014

On 10/02/2014 08:42 AM, Lennart Poettering wrote:
> On Wed, 01.10.14 22:19, Chris Adams (linux at cmadams.net) wrote:
>> One thing that might be a good topic for consideration: is there a
>> reasonable way to allow different implementations to take the /bin/sh
>> symlink?  Could this be handled through the alternatives system, so that
>> admins could choose bash vs. dash vs. whatever?

Theoretically yes, because all Bourne-Shell compatible shells should 
support the same Bourne/POSIX-compatible API.

> The shell is API. Currently, if people write shell (#!/bin/sh) scripts
> on Fedora, they can be sure that the same language is available on all
> Fedora installations. If you suddenly make /bin/sh something that
> might be different on all systems, you pretty much break API there.

ACK, history of shells has told, different shells expose different 
behaviors on certain conditions, sometime due to different 
interpretation of the POSIX-API, sometimes due to bugs and sometimes due 
to limiations of the implementation.

I.e. applying alternatives for /bin/sh would likely require a huge 
amount of testing, an amount I consider unreasonable.

> In general, I am pretty sure that except a couple of programming
> language or UNIX aficionades very few people can actually correctly
> separate bashisms from true bourneshellisms.

Well, bash is known to historically have passed through some "bashisms" 
in its POSIX-mode, "bashisms" other shells consider to be non-POSIX 
compliant or do not implement for other reasons.


More information about the devel mailing list