[OE-core] [PATCH 1/1] netbase: add entry to /etc/hosts according to /etc/hostname

ChenQi Qi.Chen at windriver.com
Tue Jan 8 01:57:20 UTC 2019


On 01/07/2019 10:38 PM, Richard Purdie wrote:
> On Fri, 2018-12-14 at 21:45 +0000, Burton, Ross wrote:
>> On Fri, 30 Nov 2018 at 02:18, Chen Qi <Qi.Chen at windriver.com> wrote:
>>> We default hostname to ${MACHINE}, but it's not in /etc/hosts,
>>> resulting in commands like `hostname -f' failing due to lack
>>> of entry.
>>>
>>> So add entry to /etc/hosts according to /etc/hostname. We do
>>> this via pkg_postinst because hostname is set in base-files
>>> recipe.
>> RP and myself are still arguing over this so I thought I'd make my
>> argument on the list for debate.
>>
>> Updating /etc/hosts is being done with a postinst in netbase simply
>> because /etc/hostname is contained in the base-files recipe. I
>> advocate just moving the creation of /etc/hosts to base-files along
>> with /etc/hostname, then base-files can write both files at the same
>> time.  There's already a dependency on base-files from netbase so
>> there will be no change in the rootfs, a file will just move between
>> packages.
> Coming back to this after the holidays, I agree with Ross, we should
> move /etc/hostname to base-files and keep this simple. I'd like to get
> this fixed, could you update the patch please?
>
> Cheers,
>
> Richard
>
>
Yes. I'll send out a new patch.

Best Regards,

Chen Qi



More information about the Openembedded-core mailing list