diff options
author | 2014-04-08 15:16:02 +0800 | |
---|---|---|
committer | 2015-02-23 17:15:30 +0100 | |
commit | 4c42c37864d9ea324467d136405ff2abb98ceffd (patch) | |
tree | 3f6d557091977b3a86ab6a573e3789beae1575ba /meta/recipes-core/busybox | |
parent | ff8aeac6cccda1a968722ce40e8cd084c4dcd1b5 (diff) | |
download | openembedded-core-contrib-4c42c37864d9ea324467d136405ff2abb98ceffd.tar.gz |
busybox: fix a sh link wrong
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6ef650359cc2a49376eb5ca92bc97b34cdd82862)
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Diffstat (limited to 'meta/recipes-core/busybox')
-rw-r--r-- | meta/recipes-core/busybox/busybox.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 0c84c1f115..bfee7a1f22 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 |