<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 12:25 AM, Andreas Müller <span dir="ltr"><<a href="mailto:schnitzeltony@googlemail.com" target="_blank">schnitzeltony@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb adM"><div class="h5">On Fri, Nov 13, 2015 at 12:41 AM, Christopher Larson <<a href="mailto:kergoth@gmail.com">kergoth@gmail.com</a>> wrote:<br>
> From: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
><br>
> We don't need nss-myhostname on systemd systems, because systemd already<br>
> provides myhostname, but we weren't configuring nsswitch to use it. Being able<br>
> to resolve the hostname is useful for a number of different applications, so<br>
> enable it using the same postinst/prerm bits which are in nss-myhostname.<br>
><br>
> Signed-off-by: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
> ---<br>
> meta/recipes-core/systemd/<a href="http://systemd_225.bb" rel="noreferrer" target="_blank">systemd_225.bb</a> | 12 ++++++++++++<br>
> 1 file changed, 12 insertions(+)<br>
><br>
> diff --git a/meta/recipes-core/systemd/<a href="http://systemd_225.bb" rel="noreferrer" target="_blank">systemd_225.bb</a> b/meta/recipes-core/systemd/<a href="http://systemd_225.bb" rel="noreferrer" target="_blank">systemd_225.bb</a><br>
> index 18c2448..20515f5 100644<br>
> --- a/meta/recipes-core/systemd/<a href="http://systemd_225.bb" rel="noreferrer" target="_blank">systemd_225.bb</a><br>
> +++ b/meta/recipes-core/systemd/<a href="http://systemd_225.bb" rel="noreferrer" target="_blank">systemd_225.bb</a><br>
> @@ -397,6 +397,18 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"<br>
> ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"<br>
> ALTERNATIVE_PRIORITY[runlevel] ?= "300"<br>
><br>
> +pkg_postinst_${PN} () {<br>
> + sed -e '/^hosts:/s/\s*\<myhostname\>//' \<br>
> + -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \<br>
> + -i $D${sysconfdir}/nsswitch.conf<br>
> +}<br>
> +<br>
> +pkg_prerm_${PN} () {<br>
> + sed -e '/^hosts:/s/\s*\<myhostname\>//' \<br>
> + -e '/^hosts:/s/\s*myhostname//' \<br>
> + -i $D${sysconfdir}/nsswitch.conf<br>
> +}<br>
> +<br>
> pkg_postinst_udev-hwdb () {<br>
> if test -n "$D"; then<br>
> ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \<br>
> --<br>
> 2.2.1<br>
><br>
</div></div>> --<br>
This seems to solve my xfce4-terminal delay - thanks. I have a<br>
questions regarding this patch: As soon as basefiles are updated<br>
resolving stops working - right? So why not handle at basefiles based<br>
on systemd distro setting?</blockquote></div><br>As far as I know, nsswitch.conf is flagged as a conffile (actually in master everything in /etc/ will be), so once it's modified externally (in this case, by the systemd recipe), the original package which installed the file won't blindliy overwrite those changes.<br>-- <br><div class="gmail_signature"><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div></div>
</div></div>