]> code.ossystems Code Review - openembedded-core.git/commitdiff
bash: use update-alternatives for the bash binary
authorAndreas Oberritter <obi@opendreambox.org>
Wed, 30 Nov 2016 18:50:26 +0000 (19:50 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 5 Feb 2017 09:20:23 +0000 (09:20 +0000)
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>
meta/recipes-extended/bash/bash.inc

index 1d08526c9e758bfcbdc80733567a46e17b0a523a..a05b987b87bfc47d0c21001daedb7319a37ca4fb 100644 (file)
@@ -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"