how to relink /bin/sh away from dash -- update-alternatives?
Tom H
tomh0665 at gmail.com
Thu May 13 00:44:39 UTC 2010
On Wed, May 12, 2010 at 7:56 PM, Florian Diesch <diesch at spamfence.net> wrote:
> "Robert P. J. Day" <rpjday at crashcourse.ca> writes:
>>
>> beyond that, is there a known reason that /bin/sh *shouldn't* link to
>> bash?
>
> Some broken shell scripts assume that /bin/sh is bash. That's a
> bug. They should be fixed to either use only POSIX sh features with
> /bin/sh or explicitly use bash if they need it.
Even though it is basically semantics, I would not quite call these
scripts broken since all they need to run properly is a change in
their shebang line to /bin/bash (or divert /bin/sh to /bin/bash).
Semantics, I know, but changing a shebang line to ensure that a
bashism is understood is much easier than actual debugging.
If /bin/sh were a "real" statically-linked /bin/sh, you would be
better off not diverting it to /bin/bash. Since both /bin/bash and
/bin/dash are dynamically-linked, it doesn't matter...
More information about the ubuntu-users
mailing list