Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@opendreambox.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/2] bash: use update-alternatives for the bash binary
Date: Wed, 30 Nov 2016 19:50:26 +0100	[thread overview]
Message-ID: <1480531827-11799-1-git-send-email-obi@opendreambox.org> (raw)

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>
---
 meta/recipes-extended/bash/bash.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index 1d08526..a05b987 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"
-- 
2.7.4



             reply	other threads:[~2016-11-30 18:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30 18:50 Andreas Oberritter [this message]
2016-11-30 18:50 ` [PATCH 2/2] util-linux: create own package for lsblk Andreas Oberritter
2017-01-30 22:22   ` Andreas Oberritter
2016-12-01 17:41 ` [PATCH 1/2] bash: use update-alternatives for the bash binary Burton, Ross
2016-12-01 19:42   ` Andreas Oberritter
2017-01-30 22:21 ` Andreas Oberritter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480531827-11799-1-git-send-email-obi@opendreambox.org \
    --to=obi@opendreambox.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox