summaryrefslogtreecommitdiff
path: root/meta/recipes-extended/bash
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2016-11-30 19:50:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-05 09:20:23 +0000
commitcf0fd8bff79a12b6eec45145ef168ebf5afebdcc (patch)
treea53366e8ed8f0ec3d44c00320dc9b2abe331a8a8 /meta/recipes-extended/bash
parentd701673b658d879726d6cf846a6d5f4173c3b0e5 (diff)
downloadopenembedded-core-cf0fd8bff79a12b6eec45145ef168ebf5afebdcc.tar.gz
openembedded-core-cf0fd8bff79a12b6eec45145ef168ebf5afebdcc.tar.bz2
openembedded-core-cf0fd8bff79a12b6eec45145ef168ebf5afebdcc.zip
bash: use update-alternatives for the bash binary
Busybox may offer a bash applet. If enabled, the alternatives mechanism avoids breaking logins if bash gets deinstalled while /bin/bash is configured as a login shell. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-extended/bash')
-rw-r--r--meta/recipes-extended/bash/bash.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index 1d08526c9e..a05b987b87 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -14,9 +14,11 @@ EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
# This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137.
CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
-ALTERNATIVE_${PN} = "sh"
+ALTERNATIVE_${PN} = "bash sh"
+ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash"
+ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash"
ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
-ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
+ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}"
ALTERNATIVE_PRIORITY = "100"
RDEPENDS_${PN} += "base-files"