On 10/18/2013 11:12 PM, Mark Hatle wrote:
On 10/18/13 9:59 AM, Phil Blundell wrote:
On Fri, 2013-10-18 at 19:11 +0800, Ming Liu wrote:
pkg_postinst_${PN} () {
- touch $D${sysconfdir}/shells
- grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >>
$D${sysconfdir}/shells
- grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >>
$D${sysconfdir}/shells
+ if [ ! -f $D${sysconfdir}/shells ]; then
One note with the above check. Whichever package is responsible for
providing the 'shells' file needs to be installed -first-. So
anything that manipulates the 'shells' file will need an RDEPENDS on
that package.
Yes, that is a good idea, I will change it as you suggest.
the best,
thank you
--Mark
+ touch $D${sysconfdir}/shells
+ fi
+
+ grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo
${base_bindir}/bash >> $D${sysconfdir}/shells
+}
This patch contains significant changes to the postinst script which
aren't described in the commit message.
p.
+
+pkg_postrm_${PN} () {
+ if [ -f $D${sysconfdir}/shells ]; then
+ printf "$(grep -v "^${base_bindir}/bash$"
$D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+
+ if [ ! -s $D${sysconfdir}/shells ]; then
+ rm $D${sysconfdir}/shells
+ fi
+ fi
}
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core