diff options
authorGary S. Robertson <gary.robertson@linaro.org>2014-12-18 15:41:26 -0600
committerGary S. Robertson <gary.robertson@linaro.org>2014-12-18 19:08:46 -0600
commit63bc0eedac9d55442290112c0bbd46e02ec7a309 (patch)
parent9744c04031821242e8473adddf4137ffc31be8ee (diff)
linaro-image-lng: uniform hostname on all machines
This patch overrides the machine-dependent OE default hostname, which is the 'machine name' for which the image was built. The new default hostname is 'lng-test-target', and is uniform across all archtectures. This reduces the number of root login prompts which LAVA must compare against when interacting with the system console, (per request from the LAVA team). At the same time it may be helpful in identifying machines which are running on LNG OE filesystems in scenarios where users are accessing the test machines interactively and/or remotely. Change-Id: Ife86ae1907bdd48ef80eef87e0a9b349a272a099 Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
1 files changed, 6 insertions, 0 deletions
diff --git a/meta-linaro/recipes-linaro/images/linaro-image-lng.bb b/meta-linaro/recipes-linaro/images/linaro-image-lng.bb
index 7d46d68a..be1aeb0f 100644
--- a/meta-linaro/recipes-linaro/images/linaro-image-lng.bb
+++ b/meta-linaro/recipes-linaro/images/linaro-image-lng.bb
@@ -62,3 +62,9 @@ qemux86_fixup() {
echo "auto eth0" >> ${IMAGE_ROOTFS}/etc/network/interfaces
echo "iface eth0 inet dhcp" >> ${IMAGE_ROOTFS}/etc/network/interfaces
+IMAGE_PREPROCESS_COMMAND += "do_mangle_hostname;"
+do_mangle_hostname() {
+ echo 'lng-test-target' > ${IMAGE_ROOTFS}${sysconfdir}/hostname