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

Koen Kooi k.kooi at student.utwente.nl
Wed Apr 1 17:01:55 UTC 2009


On 01-04-09 18:52, Chris Larson wrote:
> 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.

IIRC our default u-a is a shell script, the other version is a perl script.
Correct me if I'm wrong, it has been some years since I looked at it :)


regards,

Koen







More information about the Openembedded-devel mailing list