From feb2755614ce89f0802a002950bad8be4be41820 Mon Sep 17 00:00:00 2001
From: Lukas Bulwahn <lukas.bulwahn@bmw-carit.de>
Date: Thu, 11 Apr 2013 08:12:40 +0200
Subject: [PATCH] core-image-ros-groovy-running-roscore: augmenting hosts

---
 .../images/core-image-ros-groovy-running-roscore.bb    | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/recipes-core/images/core-image-ros-groovy-running-roscore.bb b/recipes-core/images/core-image-ros-groovy-running-roscore.bb
index d65e4a7..52f9dbb 100644
--- a/recipes-core/images/core-image-ros-groovy-running-roscore.bb
+++ b/recipes-core/images/core-image-ros-groovy-running-roscore.bb
@@ -10,8 +10,16 @@ inherit core-image
 
 IMAGE_ROOTFS_SIZE = "8192"
 
+# add own name to hosts
+# this is a simplistic setup for the qemu virtual machine with x86 architecture,
+# and not a general solution.
+augment_hosts_setting_file () {
+	echo '127.0.0.1\tqemux86.localdomain\t\tqemux86' >> ${IMAGE_ROOTFS}/etc/hosts
+}
+
 # remove not needed ipkg informations
-ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; "
+# create a custom hosts file
+ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; augment_hosts_setting_file ; "
 
 IMAGE_INSTALL += "packagegroup-core-ssh-openssh \
   roslaunch \
-- 
GitLab