summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>2015-11-11 18:56:53 +0100
committerJo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>2015-11-11 19:01:15 +0100
commitb53e01570ee880d43e1f9d1b7791d0254a7d8a6e (patch)
tree44867ba577cd321be02af0a29e6c3e55a457c0e9
parenteb8320b2e924e22c20af49a0d37bee12417ede95 (diff)
Update /etc/hosts in yardstick cloud image
Adding the hostname to /etc/hosts prevents some 'unable to resolve host' error messages. Change-Id: I1fd16007955287d436e895d53db6ce19b0b6fe3e Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
-rwxr-xr-xtools/ubuntu-server-cloudimg-modify.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/ubuntu-server-cloudimg-modify.sh b/tools/ubuntu-server-cloudimg-modify.sh
index 06579ff9a..bdf96ba5a 100755
--- a/tools/ubuntu-server-cloudimg-modify.sh
+++ b/tools/ubuntu-server-cloudimg-modify.sh
@@ -32,6 +32,11 @@ grep trusty /etc/apt/sources.list && \
# Force apt to use ipv4 due to build problems on LF POD.
echo 'Acquire::ForceIPv4 "true";' > /etc/apt/apt.conf.d/99force-ipv4
+# Add hostname to /etc/hosts.
+cat <<EOF >/etc/cloud/cloud.cfg.d/10_etc_hosts.cfg
+manage_etc_hosts: True
+EOF
+
apt-get update
apt-get install -y \
fio \