summaryrefslogtreecommitdiffstats
path: root/tools/ubuntu-server-cloudimg-modify.sh
diff options
context:
space:
mode:
authorJo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>2015-09-09 10:56:40 +0200
committerJo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>2015-09-09 18:51:47 +0200
commit4f2fce70da878ad03dc77324f6916bfcae447e1e (patch)
treee02adb8340a60cf7f1fedc9db6be332190045936 /tools/ubuntu-server-cloudimg-modify.sh
parentc00f0f4fdab37db3bf084c879ac6186054726916 (diff)
Add support for building images on CentOS
This is a workaround for building on CentOS. CentOS don't have nbd so guestfstool is used to mount the ubuntu image. The http sources has been changed to ftp as the apt-get tool inside the Ubuntu image dont work well with http sources when running on CentOS. Change-Id: I23679ff034ea76782dcc73d3283cb70ebace5ee8 JIRA: YARDSTICK-136 Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
Diffstat (limited to 'tools/ubuntu-server-cloudimg-modify.sh')
-rwxr-xr-xtools/ubuntu-server-cloudimg-modify.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/ubuntu-server-cloudimg-modify.sh b/tools/ubuntu-server-cloudimg-modify.sh
index 41d654a08..0e9bb4182 100755
--- a/tools/ubuntu-server-cloudimg-modify.sh
+++ b/tools/ubuntu-server-cloudimg-modify.sh
@@ -25,6 +25,10 @@ fi
# iperf3 only available for trusty in backports
grep trusty /etc/apt/sources.list && \
echo "deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" >> /etc/apt/sources.list
+
+# Workaround for building on CentOS (apt-get is not working with http sources)
+sed -i 's/http/ftp/' /etc/apt/sources.list
+
apt-get update
apt-get install -y \
fio \