<p dir="ltr"><br>
On 12 Nov 2015 5:41 p.m., "Christopher Larson" <<a href="mailto:kergoth@gmail.com">kergoth@gmail.com</a>> wrote:<br>
><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.</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">><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">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">systemd_225.bb</a> b/meta/recipes-core/systemd/<a href="http://systemd_225.bb">systemd_225.bb</a><br>
> index 18c2448..20515f5 100644<br>
> --- a/meta/recipes-core/systemd/<a href="http://systemd_225.bb">systemd_225.bb</a><br>
> +++ b/meta/recipes-core/systemd/<a href="http://systemd_225.bb">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>
> --<br>
> _______________________________________________<br>
> Openembedded-core mailing list<br>
> <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</p>