[OE-core] hostname issues

Christopher Larson clarson at kergoth.com
Mon Nov 16 15:57:01 UTC 2015


On Mon, Nov 16, 2015 at 7:14 AM, Andreas Müller <
schnitzeltony at googlemail.com> wrote:

> for xfce-session we have some very bad workaround entering machine
> name to /etc/hosts [1]
>
> I looked into this and found (let's assume ${MACHINE}='foomachine'):
>
> * basefiles: By default /etc/hostname contains 'foomachine'
> * netbase: /etc/hosts contains '127.0.0.1    localhost.localdomain
>    localhost'
>
> Shouldn't this be
>
> /etc/hosts: '127.0.0.1    foomachine        localhost'
> or
> /etc/hostname: 'localhost.localdomain'
>
> To test do
>
> 'ping foomachine'
> or
> hostname -f
>
> What do experts say?
>
> [1]
> https://github.com/openembedded/meta-openembedded/blob/master/meta-xfce/recipes-xfce/xfce4-session/machine-host.bb
>

I'd suggest just installing nss-myhostname for sysvinit, and for systemd,
systemd already includes the myhostname nss plugin, so it just needs
enabling in nsswitch.conf (I submitted a patch recently to make it do that
by default).
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20151116/491a2749/attachment-0002.html>


More information about the Openembedded-core mailing list