In my current yocto build, no hostname is set by default. This is strange, since within meta/recipes-core/base-files/base-files_3.0.14.bb do_install the hostname is set (if not an empty string):
if [ "${hostname}" ]; then
echo ${hostname} > ${D}${sysconfdir}/hostname
fi
A few lines above the hostname is set to the Machine name:
hostname = "${MACHINE}"
Which is transformed to (within run.do_install):
if [ "" ]; then
echo > /my-path/etc/hostname
fi
Therefore the hostname seems to be not set? The MACHINE VARIABLE is set of cause and even if i set the hostname to a fixed string, the problem persists:
hostname = "foo"
The recipe is executed by bitbake for sure and the only way to make it set the hostname is by patching like below, which is awful of cause...
echo "foo" > ${D}${sysconfdir}/hostname
I am pretty sure that I am missing something obvious here, but I am not able to track the problem down.
Here is the link to the file I am talking about http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/base-files/base-files_3.0.14.bb?h=krogoth
Would appreciate any help. Thanks!