diff options
author | Wenlin Kang <wenlin.kang@windriver.com> | 2014-04-08 15:16:02 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-09 09:53:14 +0100 |
commit | 467b19efbaa9c0cb04d2665e8cd9a0919849a5ed (patch) | |
tree | 7c2cfc7541772a2819a521efd0f04911107dc3b9 /meta | |
parent | e34ad1e27b7db3237ae0435864cced32133d7025 (diff) | |
download | poky-467b19efbaa9c0cb04d2665e8cd9a0919849a5ed.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.
(From OE-Core rev: 6ef650359cc2a49376eb5ca92bc97b34cdd82862)
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 eedbe4669b..e59afe67bc 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc | |||
@@ -189,7 +189,9 @@ do_install () { | |||
189 | install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir} | 189 | install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir} |
190 | install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir} | 190 | install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir} |
191 | install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir} | 191 | install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir} |
192 | ln -sf busybox.nosuid ${D}${base_bindir}/sh | 192 | if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then |
193 | ln -sf busybox.nosuid ${D}${base_bindir}/sh | ||
194 | fi | ||
193 | # Keep a default busybox for people who want to invoke busybox directly. | 195 | # Keep a default busybox for people who want to invoke busybox directly. |
194 | # This is also useful for the on device upgrade. Because we want | 196 | # This is also useful for the on device upgrade. Because we want |
195 | # to use the busybox command in postinst. | 197 | # to use the busybox command in postinst. |
@@ -201,7 +203,9 @@ do_install () { | |||
201 | install -m 0755 ${B}/busybox ${D}${base_bindir} | 203 | install -m 0755 ${B}/busybox ${D}${base_bindir} |
202 | fi | 204 | fi |
203 | install -m 0644 ${S}/busybox.links ${D}${sysconfdir} | 205 | install -m 0644 ${S}/busybox.links ${D}${sysconfdir} |
204 | ln -sf busybox ${D}${base_bindir}/sh | 206 | if grep -q "CONFIG_FEATURE_SH_IS_ASH=y" ${B}/.config; then |
207 | ln -sf busybox ${D}${base_bindir}/sh | ||
208 | fi | ||
205 | # We make this symlink here to eliminate the error when upgrading together | 209 | # We make this symlink here to eliminate the error when upgrading together |
206 | # with busybox-syslog. Without this symlink, the opkg may think of the | 210 | # with busybox-syslog. Without this symlink, the opkg may think of the |
207 | # busybox.nosuid as obsolete and remove it, resulting in dead links like | 211 | # busybox.nosuid as obsolete and remove it, resulting in dead links like |