<p dir="ltr"><br>
On 12 Nov 2015 5:41 p.m., &quot;Christopher Larson&quot; &lt;<a href="mailto:kergoth@gmail.com">kergoth@gmail.com</a>&gt; wrote:<br>
&gt;<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.</p>
<p dir="ltr">I have this and a similar change for resolved in an append at work. Would others be interested in that too?<br></p>
<p dir="ltr">&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">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">systemd_225.bb</a> b/meta/recipes-core/systemd/<a href="http://systemd_225.bb">systemd_225.bb</a><br>
&gt; index 18c2448..20515f5 100644<br>
&gt; --- a/meta/recipes-core/systemd/<a href="http://systemd_225.bb">systemd_225.bb</a><br>
&gt; +++ b/meta/recipes-core/systemd/<a href="http://systemd_225.bb">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>
&gt; --<br>
&gt; _______________________________________________<br>
&gt; Openembedded-core mailing list<br>
&gt; <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
&gt; <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</p>