diff --git a/proxy.sh b/proxy.sh index 37dc261..5619ca4 100755 --- a/proxy.sh +++ b/proxy.sh @@ -25,7 +25,10 @@ if test -f /etc/yum.conf; then rm -f /etc/yum/pluginconf.d/fastestmirror.conf - sed -i -e 's/^#baseurl/baseurl/; s/^mirrorlist=/#mirrorlist-/' /etc/yum.repos.d/CentOS-*.repo + repofiles=$(grep -rl '^#baseurl' /etc/yum.repos.d) + if [ -n "$repofiles" ]; then + sed -i -e 's/^#baseurl/baseurl/; s/^mirrorlist=/#mirrorlist-/' $repofiles + fi if [ ! -f /var/tmp/yum-clean.stamp ]; then pgrep -f yum || yum clean all || true -- libgit2 0.21.2