Merge "Only guard yum update against epel if enabled"

This commit is contained in:
Jenkins 2015-01-05 15:58:05 +00:00 committed by Gerrit Code Review
commit b4f8a55a78

View File

@ -40,7 +40,13 @@ if [ -f /etc/redhat-release ]; then
if grep -q 'CentOS release 6' /etc/redhat-release; then
# chicken-and-egg ... hp cloud image has EPEL installed, but
# we can't connect to it...
sudo yum --disablerepo=epel update -y ca-certificates
# However, if we're not on an hp cloud image, we may not have
# epel and --disablerepo will fail
if yum repolist | grep epel &> /dev/null ; then
sudo yum --disablerepo=epel update -y ca-certificates
else
sudo yum update -y ca-certificates
fi
fi
fi