Check for epel before installing it
instack runs this script on a system where epel has already been installed, which causes the yum command to fail. Only installing the epel-release rpm when it isn't already present addresses the issue. Change-Id: Ia179d7c7ed69ea5f785b5dcd16394c7663a145cc
This commit is contained in:
parent
8a8bbb5673
commit
e5a2e07301
@ -3,7 +3,7 @@ set -eu
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [[ "rhel7 centos7" =~ "$DISTRO_NAME" ]]; then
|
if [[ "rhel7 centos7" =~ "$DISTRO_NAME" ]]; then
|
||||||
yum install -y http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
|
rpm -q epel-release || yum install -y http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
|
||||||
elif [[ "rhel" =~ "$DISTRO_NAME" ]]; then
|
elif [[ "rhel" =~ "$DISTRO_NAME" ]]; then
|
||||||
yum install -y http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
|
rpm -q epel-release || yum install -y http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user