On Fri, 30 Nov 2018 at 02:18, Chen Qi <qi.c...@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.

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to