Commit dd65f4999f03980f62f8975ba0ea92ca288a752b

Authored by Antonio Terceiro
1 parent abe906a0

proxy.sh: stop yum from downloading from random places

This will improve the cache hit ratio
Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
@@ -23,7 +23,9 @@ if test -f /etc/yum.conf; then @@ -23,7 +23,9 @@ if test -f /etc/yum.conf; then
23 sed -i -s '/\[main\]/ a http_caching=packages' /etc/yum.conf 23 sed -i -s '/\[main\]/ a http_caching=packages' /etc/yum.conf
24 sed -i -s '/\[main\]/ a proxy='$http_proxy /etc/yum.conf 24 sed -i -s '/\[main\]/ a proxy='$http_proxy /etc/yum.conf
25 25
26 - sed -i -e 's/^enabled=.*/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf 26 + rm -f /etc/yum/pluginconf.d/fastestmirror.conf
  27 +
  28 + sed -i -e 's/^#baseurl/baseurl/; s/^mirrorlist=/#mirrorlist-/' /etc/yum.repos.d/CentOS-*.repo
27 29
28 if [ ! -f /var/tmp/yum-clean.stamp ]; then 30 if [ ! -f /var/tmp/yum-clean.stamp ]; then
29 pgrep -f yum || yum clean all || true 31 pgrep -f yum || yum clean all || true