Install EPEL for rhel6 if not detected
Simple check to see if EPEL repo is enabled for RHEL6 and, if not, automated install of the repo RPM. Also adds an additional sanity check which checking for pip. In the prior case of EPEL being disabled, a RHEL6 host may not have access to python-pip. Although this shouldn't happen, its a good sanity check. Change-Id: I4e8a4dda9475b75d071534d4eef469198502a048
This commit is contained in:
parent
c29c392d26
commit
535a8148cc
@ -1413,6 +1413,10 @@ function get_pip_command() {
|
||||
else
|
||||
which pip
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
die $LINENO "Unable to find pip; cannot continue"
|
||||
fi
|
||||
}
|
||||
|
||||
# Path permissions sanity check
|
||||
|
15
stack.sh
15
stack.sh
@ -51,13 +51,24 @@ fi
|
||||
# Installing Open vSwitch on RHEL6 requires enabling the RDO repo.
|
||||
RHEL6_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"http://rdo.fedorapeople.org/openstack/openstack-grizzly/rdo-release-grizzly-3.noarch.rpm"}
|
||||
RHEL6_RDO_REPO_ID=${RHEL6_RDO_REPO_ID:-"openstack-grizzly"}
|
||||
# RHEL6 requires EPEL for many Open Stack dependencies
|
||||
RHEL6_EPEL_RPM=${RHEL6_EPEL_RPM:-"http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"}
|
||||
|
||||
if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
|
||||
|
||||
if ! yum repolist enabled $RHEL6_RDO_REPO_ID | grep -q $RHEL6_RDO_REPO_ID; then
|
||||
echo "RDO repo not detected; installing"
|
||||
yum_install $RHEL6_RDO_REPO_RPM
|
||||
fi
|
||||
yum_install $RHEL6_RDO_REPO_RPM || \
|
||||
die $LINENO "Error installing RDO repo, cannot continue"
|
||||
fi
|
||||
|
||||
if ! yum repolist enabled epel | grep -q 'epel'; then
|
||||
echo "EPEL not detected; installing"
|
||||
yum_install ${RHEL6_EPEL_RPM} || \
|
||||
die $LINENO "Error installing EPEL repo, cannot continue"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Global Settings
|
||||
# ===============
|
||||
|
Loading…
Reference in New Issue
Block a user