salt-bootstrap icon indicating copy to clipboard operation
salt-bootstrap copied to clipboard

RHEL 6: bootstrap-salt.sh will install EPEL even if EPEL repo is already installed (Patch Included)

Open cingeyedog opened this issue 12 years ago • 1 comments

Bootstrap-salt.sh will install EPEL even if the EPEL repository is already installed.

For your consideration: Will check to see if EPEL is installed before installing

[root@saltmaster ~]# cat bootstrap2.patch 
--- /usr/lib/python2.6/site-packages/salt/cloud/deploy/bootstrap-salt.sh    2014-06-28 10:15:29.548998882 -0400
+++ deploy.sh   2014-06-28 10:16:49.830996262 -0400
@@ -2273,7 +2273,9 @@
     if [ $DISTRO_MAJOR_VERSION -eq 5 ]; then
         rpm -Uvh --force http://mirrors.kernel.org/fedora-epel/5/${EPEL_ARCH}/epel-release-5-4.noarch.rpm || return 1
     elif [ $DISTRO_MAJOR_VERSION -eq 6 ]; then
-        rpm -Uvh --force http://mirrors.kernel.org/fedora-epel/6/${EPEL_ARCH}/epel-release-6-8.noarch.rpm || return 1
+        if [ ! "$(/bin/rpm -q epel-release --nodigest --nosignature)" ]; then
+            rpm -Uvh --force http://mirrors.kernel.org/fedora-epel/6/${EPEL_ARCH}/epel-release-6-8.noarch.rpm || return 1
+        fi
     else
         echoerror "Failed add EPEL repository support."
         return 1

cingeyedog avatar Jun 28 '14 14:06 cingeyedog

Could you make this a pull request so you keep ownership of the changes?

I can do it myself but we like to keep the credits on the committers/bugfixers

s0undt3ch avatar Jun 28 '14 14:06 s0undt3ch