how to relink /bin/sh away from dash -- update-alternatives?
Robert P. J. Day
rpjday at crashcourse.ca
Wed May 12 18:28:26 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.
ah, of course, i knew that. :-)
> Unlinking /bin/sh seems very dangerous to me as sh is needed for the
> boot scripts to run!
i realize that, which is why i wanted to ask smarter people than me
about it.
> Why does bitbake make this strange recommendation?
i can ask. here's the python excerpt from the bitbake sanity
checker code:
try:
if os.path.basename(os.readlink('/bin/sh')) == 'dash':
messages = messages + "Using dash as /bin/sh
causes various subtle build problems, please use bash instead.\n"
except:
pass
what the "subtle build problems" are, i have no idea. i'll see if i
can find out. beyond that, is there a known reason that /bin/sh
*shouldn't* link to bash? i can simply readjust the symlink, but
making a change that fundamental makes me nervous.
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