From 762ac622dfcae225efe0250a70608b3396912ef2 Mon Sep 17 00:00:00 2001 From: Ben Hosmer Date: Wed, 26 Sep 2012 08:09:27 -0400 Subject: [PATCH] Adding rudimentary support for RHEL/CentOS 6 bootstrap --- bootstrap-salt-minion.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt-minion.sh b/bootstrap-salt-minion.sh index 7dc136e..8f48328 100644 --- a/bootstrap-salt-minion.sh +++ b/bootstrap-salt-minion.sh @@ -75,12 +75,20 @@ if [ "$UNAME" = "Linux" ] ; then log "Debian version $VER not supported." exit 1 fi + elif [ -f /etc/redhat-release ] ; then + OS=$(cat /etc/redhat-release) + CODENAME=$(cat /etc/redhat-release) + log "Installing for Redhat/CentOS" + do_with_root rpm -Uvh --force http://mirrors.kernel.org/fedora-epel/6/x86_64/epel-release-6-7.noarch.rpm + do_with_root yum update + do_with_root yum -y install salt-minion --enablerepo=epel-testing + do_with_root /sbin/chkconfig salt-minion on + do_with_root salt-minion start else - log "Unable to install. Bootstrapping only supported on Debian/Ubuntu." + log "Unable to install. Bootstrapping only supported on *Some OS.*" exit 1 fi fi log "Salt has been installed!" -trap - EXIT - +trap - EXIT \ No newline at end of file