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

Chris Larson clarson at kergoth.com
Fri Mar 27 21:02:23 UTC 2009


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 :)

On Fri, Mar 27, 2009 at 1:50 PM, Tim Harvey <tharvey at irobot.com> wrote:
> Add alternative configuration for /bin/sh -> /bin/bash so that for example
> bash can exist (and override) as shell if busybox is also installed
>
> diff --git a/recipes/bash/bash.inc b/recipes/bash/bash.inc
> index 4eba689..7c6122b 100644
> --- a/recipes/bash/bash.inc
> +++ b/recipes/bash/bash.inc
> @@ -4,7 +4,7 @@ DEPENDS = "ncurses"
> SECTION = "base/shell"
> LICENSE = "GPL"
>
> -inherit autotools gettext
> +inherit autotools gettext update-alternatives
>
> PARALLEL_MAKE = ""
>
> @@ -33,3 +33,8 @@ pkg_postinst () {
>       grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >>
> $D${sysconfdir}/shells
>       grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >>
> $D${sysconfdir}/shells
> }
> +
> +ALTERNATIVE_NAME = "sh"
> +ALTERNATIVE_LINK = "${base_bindir}/sh"
> +ALTERNATIVE_PATH = "${base_bindir}/bash"
> +ALTERNATIVE_PRIORITY = "90"
> diff --git a/recipes/bash/bash_3.0.bb b/recipes/bash/bash_3.0.bb
> index e23887a..8165d07 100644
> --- a/recipes/bash/bash_3.0.bb
> +++ b/recipes/bash/bash_3.0.bb
> @@ -1,5 +1,5 @@
> require bash.inc
> -PR = "r11"
> +PR = "r12"
>
> SRC_URI += "\
>  file://bash-3.0-fixes.patch;patch=1 \
> diff --git a/recipes/bash/bash_3.2.bb b/recipes/bash/bash_3.2.bb
> index 6a48a4b..e175467 100644
> --- a/recipes/bash/bash_3.2.bb
> +++ b/recipes/bash/bash_3.2.bb
> @@ -1,6 +1,6 @@
> require bash.inc
>
> -PR = "r7"
> +PR = "r8"
>
> SRC_URI += "\
>           file://builtins.patch;patch=1 \
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



-- 
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