how to relink /bin/sh away from dash -- update-alternatives?

Robert P. J. Day rpjday at crashcourse.ca
Wed May 12 18:32:18 UTC 2010


On Wed, 12 May 2010, Tony Arnold wrote:

> Robert,
>
> On 12/05/10 19:09, Robert P. J. Day wrote:
> >
> >    *sigh*.  it's embarrassing to ask trivial questions like this but,
> > sometimes, google just doesn't come through and i'm still feeling my
> > way around ubuntu.
> >
> >    i'm setting up to build openembedded on my lynx box, and the sanity
> > check run by bitbake strongly recommends that i don't leave /bin/sh
> > linked to dash.  currently, there's a symlink /bin/sh ->  dash.  but
> > i'm assuming this is managed by the "alternatives" feature, yet:
> >
> > $ sudo update-alternatives --config sh
> > update-alternatives: error: no alternatives for sh.
> > $
> >
> >    what am i screwing up?  i'm just about to run
>
> Nothing. If sh wedre managed by the alternatives system, then /bin/sh
> would link to /etc/alternatives/sh which would link to /bin/dash.
>
> Unlinking /bin/sh seems very dangerous to me as sh is needed for the
> boot scripts to run!
>
> Why does bitbake make this strange recommendation?

  ok, google comes through with the proposed solution:

http://wiki.openembedded.net/index.php/OEandYourDistro

"Check that /bin/sh (ls -l /bin/sh) is not symbolically linked to
dash. "dash" is a POSIX compliant shell that is much smaller than
"bash" -- however some broken shell scripts still make use of bash
extensions while calling into /bin/sh. To work around this issue call
"sudo dpkg-reconfigure dash" and select No when it asks you to install
dash as /bin/sh. "

  i can live with that explanation.

rday


-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================




More information about the ubuntu-users mailing list