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>
This commit is contained in:
parent
1565a24918
commit
33dd5fb96c
|
@ -398,6 +398,9 @@ pkg_postinst_${PN} () {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then
|
||||||
|
grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_prerm_${PN} () {
|
pkg_prerm_${PN} () {
|
||||||
|
@ -422,6 +425,12 @@ pkg_prerm_${PN} () {
|
||||||
export PATH=$PATH:$tmpdir
|
export PATH=$PATH:$tmpdir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pkg_postrm_${PN} () {
|
||||||
|
if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links* && [ ! -e $D${base_bindir}/bash ]; then
|
||||||
|
printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
pkg_prerm_${PN}-syslog () {
|
pkg_prerm_${PN}-syslog () {
|
||||||
# remove syslog
|
# remove syslog
|
||||||
if test "x$D" = "x"; then
|
if test "x$D" = "x"; then
|
||||||
|
|
Loading…
Reference in New Issue