summaryrefslogtreecommitdiff
path: root/tools/run-centos
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2017-10-19 12:58:12 -0600
committerChad Smith <chad.smith@canonical.com>2017-10-19 12:59:43 -0600
commitee90a6cda4083479d5e9e2aa26887d3db91a3785 (patch)
tree817a13bd84c5b61e516f75edae41bc78241fb07f /tools/run-centos
parent41152f10ddbd8681cdac44b408038a4f23ab02df (diff)
downloadvyos-cloud-init-ee90a6cda4083479d5e9e2aa26887d3db91a3785.tar.gz
vyos-cloud-init-ee90a6cda4083479d5e9e2aa26887d3db91a3785.zip
tools: disable fastestmirror if using proxy
Per centos documentation using the fastestmirror plugin is effective at finding the fastest mirror, unless you are behind a proxy. In that case you should disable it. Therefore, in our tests if we are setting the proxy we should also disable the fastestmirror plugin.
Diffstat (limited to 'tools/run-centos')
-rwxr-xr-xtools/run-centos1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/run-centos b/tools/run-centos
index d44d5145..e87b2025 100755
--- a/tools/run-centos
+++ b/tools/run-centos
@@ -153,6 +153,7 @@ start_container() {
if [ ! -z "${http_proxy-}" ]; then
debug 1 "configuring proxy ${http_proxy}"
inside "$name" sh -c "echo proxy=$http_proxy >> /etc/yum.conf"
+ inside "$name" sed -i s/enabled=1/enabled=0/ /etc/yum/pluginconf.d/fastestmirror.conf
fi
}