From ee001cf4bdc37b8793ea081affe90d01fd13a800 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Thu, 2 Oct 2014 12:14:25 +0200 Subject: [PATCH] Ensure epel7 is installed only on rhel7/centos7 Change-Id: I5812812f7d2cb5ba2e310e33d6e01cda8823c1c4 --- elements/epel/pre-install.d/05-rpm-epel-release | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elements/epel/pre-install.d/05-rpm-epel-release b/elements/epel/pre-install.d/05-rpm-epel-release index 92fd2270..ec4bbee0 100755 --- a/elements/epel/pre-install.d/05-rpm-epel-release +++ b/elements/epel/pre-install.d/05-rpm-epel-release @@ -2,4 +2,8 @@ set -eu set -o pipefail -yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm +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 +elif [[ "rhel" =~ "$DISTRO_NAME" ]]; then + yum install -y http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm +fi