summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2017-04-28 20:31:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-29 11:17:23 +0100
commit33dd5fb96cd0754191185c01247ee9ee8587c30e (patch)
tree3ab9a3b74a68249d7c0785cf4d8d24293189006d /meta/recipes-core
parent1565a2491847370939b87f6fd0c281b7f317ab1c (diff)
downloadpoky-33dd5fb96cd0754191185c01247ee9ee8587c30e.tar.gz
busybox: make bash a valid login shell if enabled
Add bash to /etc/shells if busybox is built with bash applet anabled to fix login via dropbear. (From OE-Core rev: 86a2db0b2997fd05882ae0119ef45b1ea5411d39) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/busybox/busybox.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 375632dcc3..adc6e9a717 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -398,6 +398,9 @@ pkg_postinst_${PN} () {
398 fi 398 fi
399 done 399 done
400 fi 400 fi
401 if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then
402 grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
403 fi
401} 404}
402 405
403pkg_prerm_${PN} () { 406pkg_prerm_${PN} () {
@@ -422,6 +425,12 @@ pkg_prerm_${PN} () {
422 export PATH=$PATH:$tmpdir 425 export PATH=$PATH:$tmpdir
423} 426}
424 427
428pkg_postrm_${PN} () {
429 if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links* && [ ! -e $D${base_bindir}/bash ]; then
430 printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
431 fi
432}
433
425pkg_prerm_${PN}-syslog () { 434pkg_prerm_${PN}-syslog () {
426 # remove syslog 435 # remove syslog
427 if test "x$D" = "x"; then 436 if test "x$D" = "x"; then