[OE-core] [PATCH] image.bbclass: Adding loop back for machine name in hosts file

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Tue Aug 5 11:22:25 UTC 2014


sujith h <sujith.h-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> writes:

> Is it ok to read from /etc/hostname and then have that in the /etc/hosts
> file, rather than using ${MACHINE}?
> ...
> +         echo 127.0.1.1 "       "${MACHINE} >> ${IMAGE_ROOTFS}${sysconfdir}/hosts

I do not see how this can be done while building the image or the
packages.  Both the hostname and the ip address can be configured at
runtime.  As this can happen dynamically e.g. by DHCP and can change
at every boot or even at runtime, there is no generic way (e.g. by
firstboot mechanisms) to add such entries.


Enrico



More information about the Openembedded-core mailing list