[oe] [PATCH] bash: add alternative configuration for bin/sh -> /bin/bash

Chris Larson clarson at kergoth.com
Wed Apr 1 16:52:07 UTC 2009


On Wed, Apr 1, 2009 at 9:26 AM, Tim Harvey <tharvey at irobot.com> wrote:
> Chris Larson wrote:
>>
>> Be very careful with this.  Specifically, be sure to thoroughly test
>> installing bash onto a system that currently has busybox, and the
>> upgrade paths for both busybox and bash.  You never want to get into a
>> state, due to pre/post rm/install script execution order, where
>> /bin/sh doesn't exist.  If that happens, you won't be able to execute
>> the next script to fix it :)
>>
>
> in my case, I have both bash and busybox installed and I want bash to take
> priority as the /bin/sh which it otherwise does not.
>
> attempting to remove the package that contains your shell is something you
> need to be careful as anyway.
>
> This seems to me to be a prime example of where alternatives should be used?

You missed my point, it seems.  I was talking about
update-alternatives.  Depending on how update-alternatives is
implemented, there could be issues similar to what I mentioned in the
previous email.  Consider: if it uses system(), which calls /bin/sh,
to remove the old /bin/sh link, and then calls system() again to
create the new, it will fail.  Speculation, but again, it's something
you always need to keep in mind if you're messing with /bin/sh in any
way.
-- 
Chris Larson
clarson at kergoth dot com
clarson at mvista dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Software Engineer
MontaVista Software, Inc.




More information about the Openembedded-devel mailing list