The external recipe has postinsts so to make this a true replacement add them here as well.
Signed-off-by: Koen Kooi <k...@dominion.thruhere.net> --- meta/recipes-core/systemd/systemd_216.bb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb index 331da99..3e572e8 100644 --- a/meta/recipes-core/systemd/systemd_216.bb +++ b/meta/recipes-core/systemd/systemd_216.bb @@ -369,6 +369,28 @@ pkg_prerm_udev-hwdb () { rm -f ${sysconfdir}/udev/hwdb.bin } +# Do not activate libnss-resolve by default, that needs more thought + +pkg_postinst_${PN} () { + sed -e '/^hosts:/s/\s*\<myhostname\>//' \ + -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \ + -i $D${sysconfdir}/nsswitch.conf + + sed -e '/^hosts:/s/\s*\<mymachine\>//' \ + -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mymachine \3\4\5/' \ + -i $D${sysconfdir}/nsswitch.conf +} + +pkg_prerm_${PN} () { + sed -e '/^hosts:/s/\s*\<myhostname\>//' \ + -e '/^hosts:/s/\s*myhostname//' \ + -i $D${sysconfdir}/nsswitch.conf + + sed -e '/^hosts:/s/\s*\<mymachine\>//' \ + -e '/^hosts:/s/\s*mymachine//' \ + -i $D${sysconfdir}/nsswitch.conf +} + # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so # that we don't build both udev and systemd in world builds. python () { -- 1.9.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core