* [PATCH] busybox: fix a sh link wrong
@ 2014-04-08 7:16 Wenlin Kang
2014-08-28 9:37 ` Wenlin Kang
0 siblings, 1 reply; 3+ messages in thread
From: Wenlin Kang @ 2014-04-08 7:16 UTC (permalink / raw)
To: openembedded-core
When both bash and busybox be installed, without ash support
in busybox,if bash is installed before busybox in the final stage,
even if ALTERNATIVE_PRIORITY of bash > ALTERNATIVE_PRIORITY of busybox,
the symlink from /bin/sh to bash can be yet overwritten by busybox.
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
---
meta/recipes-core/busybox/busybox.inc | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 69b9b0c..bf2ddc1 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -188,7 +188,9 @@ do_install () {
install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir}
install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir}
install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir}
- ln -sf busybox.nosuid ${D}${base_bindir}/sh
+ if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+ ln -sf busybox.nosuid ${D}${base_bindir}/sh
+ fi
# Keep a default busybox for people who want to invoke busybox directly.
# This is also useful for the on device upgrade. Because we want
# to use the busybox command in postinst.
@@ -200,7 +202,9 @@ do_install () {
install -m 0755 ${B}/busybox ${D}${base_bindir}
fi
install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
- ln -sf busybox ${D}${base_bindir}/sh
+ if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
+ ln -sf busybox ${D}${base_bindir}/sh
+ fi
# We make this symlink here to eliminate the error when upgrading together
# with busybox-syslog. Without this symlink, the opkg may think of the
# busybox.nosuid as obsolete and remove it, resulting in dead links like
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] busybox: fix a sh link wrong
2014-04-08 7:16 [PATCH] busybox: fix a sh link wrong Wenlin Kang
@ 2014-08-28 9:37 ` Wenlin Kang
2014-08-28 12:12 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 3+ messages in thread
From: Wenlin Kang @ 2014-08-28 9:37 UTC (permalink / raw)
To: openembedded-core
On 2014年04月08日 15:16, Wenlin Kang wrote:
> When both bash and busybox be installed, without ash support
> in busybox,if bash is installed before busybox in the final stage,
> even if ALTERNATIVE_PRIORITY of bash > ALTERNATIVE_PRIORITY of busybox,
> the symlink from /bin/sh to bash can be yet overwritten by busybox.
>
> Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
> ---
> meta/recipes-core/busybox/busybox.inc | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
> index 69b9b0c..bf2ddc1 100644
> --- a/meta/recipes-core/busybox/busybox.inc
> +++ b/meta/recipes-core/busybox/busybox.inc
> @@ -188,7 +188,9 @@ do_install () {
> install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir}
> install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir}
> install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir}
> - ln -sf busybox.nosuid ${D}${base_bindir}/sh
> + if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
> + ln -sf busybox.nosuid ${D}${base_bindir}/sh
> + fi
> # Keep a default busybox for people who want to invoke busybox directly.
> # This is also useful for the on device upgrade. Because we want
> # to use the busybox command in postinst.
> @@ -200,7 +202,9 @@ do_install () {
> install -m 0755 ${B}/busybox ${D}${base_bindir}
> fi
> install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
> - ln -sf busybox ${D}${base_bindir}/sh
> + if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
> + ln -sf busybox ${D}${base_bindir}/sh
> + fi
> # We make this symlink here to eliminate the error when upgrading together
> # with busybox-syslog. Without this symlink, the opkg may think of the
> # busybox.nosuid as obsolete and remove it, resulting in dead links like
ping ...
--
Thanks,
Wenlin Kang
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] busybox: fix a sh link wrong
2014-08-28 9:37 ` Wenlin Kang
@ 2014-08-28 12:12 ` Bernhard Reutner-Fischer
0 siblings, 0 replies; 3+ messages in thread
From: Bernhard Reutner-Fischer @ 2014-08-28 12:12 UTC (permalink / raw)
To: Wenlin Kang, openembedded-core
On 28 August 2014 11:37:26 CEST, Wenlin Kang <wenlin.kang@windriver.com> wrote:
>On 2014年04月08日 15:16, Wenlin Kang wrote:
>> When both bash and busybox be installed, without ash support
>> in busybox,if bash is installed before busybox in the final stage,
>> even if ALTERNATIVE_PRIORITY of bash > ALTERNATIVE_PRIORITY of
>busybox,
>> the symlink from /bin/sh to bash can be yet overwritten by busybox.
>>
>> Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
>> ---
>> meta/recipes-core/busybox/busybox.inc | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-core/busybox/busybox.inc
>b/meta/recipes-core/busybox/busybox.inc
>> index 69b9b0c..bf2ddc1 100644
>> --- a/meta/recipes-core/busybox/busybox.inc
>> +++ b/meta/recipes-core/busybox/busybox.inc
>> @@ -188,7 +188,9 @@ do_install () {
>> install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir}
>> install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir}
>> install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir}
>> - ln -sf busybox.nosuid ${D}${base_bindir}/sh
>> + if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then
Better
egrep -q "^CONFIG_FEATURE_SH_IS_[^=]*=y"
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-28 12:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-08 7:16 [PATCH] busybox: fix a sh link wrong Wenlin Kang
2014-08-28 9:37 ` Wenlin Kang
2014-08-28 12:12 ` Bernhard Reutner-Fischer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.