* hostname issues
@ 2015-11-16 14:14 Andreas Müller
2015-11-16 15:57 ` Christopher Larson
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Müller @ 2015-11-16 14:14 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Hi,
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
Regards
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: hostname issues
2015-11-16 14:14 hostname issues Andreas Müller
@ 2015-11-16 15:57 ` Christopher Larson
2015-11-16 16:37 ` Andreas Müller
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Larson @ 2015-11-16 15:57 UTC (permalink / raw)
To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]
On Mon, Nov 16, 2015 at 7:14 AM, Andreas Müller <
schnitzeltony@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
[-- Attachment #2: Type: text/html, Size: 1838 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: hostname issues
2015-11-16 15:57 ` Christopher Larson
@ 2015-11-16 16:37 ` Andreas Müller
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Müller @ 2015-11-16 16:37 UTC (permalink / raw)
To: Christopher Larson; +Cc: Patches and discussions about the oe-core layer
On Mon, Nov 16, 2015 at 4:57 PM, Christopher Larson <clarson@kergoth.com> wrote:
> On Mon, Nov 16, 2015 at 7:14 AM, Andreas Müller
> <schnitzeltony@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).
Thanks a lot - that looks promising. Will give the systemd nss path a
test with your patch.
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-16 16:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16 14:14 hostname issues Andreas Müller
2015-11-16 15:57 ` Christopher Larson
2015-11-16 16:37 ` Andreas Müller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.