<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">&lt;<a href="mailto:schnitzeltony@googlemail.com" target="_blank">schnitzeltony@googlemail.com</a>&gt;</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 &lt;<a href="mailto:kergoth@gmail.com">kergoth@gmail.com</a>&gt; wrote:<br>
&gt; From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
&gt;<br>
&gt; We don&#39;t need nss-myhostname on systemd systems, because systemd already<br>
&gt; provides myhostname, but we weren&#39;t configuring nsswitch to use it. Being able<br>
&gt; to resolve the hostname is useful for a number of different applications, so<br>
&gt; enable it using the same postinst/prerm bits which are in nss-myhostname.<br>
&gt;<br>
&gt; Signed-off-by: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
&gt; ---<br>
&gt;  meta/recipes-core/systemd/<a href="http://systemd_225.bb" rel="noreferrer" target="_blank">systemd_225.bb</a> | 12 ++++++++++++<br>
&gt;  1 file changed, 12 insertions(+)<br>
&gt;<br>
&gt; 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>
&gt; index 18c2448..20515f5 100644<br>
&gt; --- a/meta/recipes-core/systemd/<a href="http://systemd_225.bb" rel="noreferrer" target="_blank">systemd_225.bb</a><br>
&gt; +++ b/meta/recipes-core/systemd/<a href="http://systemd_225.bb" rel="noreferrer" target="_blank">systemd_225.bb</a><br>
&gt; @@ -397,6 +397,18 @@ ALTERNATIVE_TARGET[runlevel] = &quot;${base_bindir}/systemctl&quot;<br>
&gt;  ALTERNATIVE_LINK_NAME[runlevel] = &quot;${base_sbindir}/runlevel&quot;<br>
&gt;  ALTERNATIVE_PRIORITY[runlevel] ?= &quot;300&quot;<br>
&gt;<br>
&gt; +pkg_postinst_${PN} () {<br>
&gt; +       sed -e &#39;/^hosts:/s/\s*\&lt;myhostname\&gt;//&#39; \<br>
&gt; +               -e &#39;s/\(^hosts:.*\)\(\&lt;files\&gt;\)\(.*\)\(\&lt;dns\&gt;\)\(.*\)/\1\2 myhostname \3\4\5/&#39; \<br>
&gt; +               -i $D${sysconfdir}/nsswitch.conf<br>
&gt; +}<br>
&gt; +<br>
&gt; +pkg_prerm_${PN} () {<br>
&gt; +       sed -e &#39;/^hosts:/s/\s*\&lt;myhostname\&gt;//&#39; \<br>
&gt; +               -e &#39;/^hosts:/s/\s*myhostname//&#39; \<br>
&gt; +               -i $D${sysconfdir}/nsswitch.conf<br>
&gt; +}<br>
&gt; +<br>
&gt;  pkg_postinst_udev-hwdb () {<br>
&gt;         if test -n &quot;$D&quot;; then<br>
&gt;                 ${@qemu_run_binary(d, &#39;$D&#39;, &#39;${base_bindir}/udevadm&#39;)} hwdb --update \<br>
&gt; --<br>
&gt; 2.2.1<br>
&gt;<br>
</div></div>&gt; --<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&#39;s modified externally (in this case, by the systemd recipe), the original package which installed the file won&#39;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>