Skip to content

Commit

Permalink
Merge pull request saltstack#19664 from s0undt3ch/2014.7
Browse files Browse the repository at this point in the history
[2014.7] Update the bootstrap script to latest stable v2015.01.12
  • Loading branch information
Nicole Thomas committed Jan 12, 2015
2 parents cfb8670 + 5f3bd0e commit a48e565
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions salt/cloud/deploy/bootstrap-salt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# CREATED: 10/15/2012 09:49:37 PM WEST
#======================================================================================================================
set -o nounset # Treat unset variables as an error
__ScriptVersion="2014.12.11"
__ScriptVersion="2015.01.12"
__ScriptName="bootstrap-salt.sh"

#======================================================================================================================
Expand Down Expand Up @@ -1993,6 +1993,9 @@ install_debian_6_deps() {

apt-get update

# Make sure wget is available
__apt_get_install_noinput wget

# Install Keys
__apt_get_install_noinput debian-archive-keyring && apt-get update

Expand Down Expand Up @@ -2090,6 +2093,10 @@ install_debian_7_deps() {
export DEBIAN_FRONTEND=noninteractive

apt-get update

# Make sure wget is available
__apt_get_install_noinput wget

# Install Keys
__apt_get_install_noinput debian-archive-keyring && apt-get update

Expand Down Expand Up @@ -2577,6 +2584,7 @@ install_centos_stable_deps() {
__install_epel_repository || return 1

if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]; then
yum -y install python-hashlib || return 1
__install_saltstack_copr_zeromq_repository || return 1
fi

Expand Down Expand Up @@ -2729,15 +2737,18 @@ install_centos_git_post() {
[ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue

if [ ! -f /usr/lib/systemd/system/salt-${fname}.service ] || ([ -f /usr/lib/systemd/system/salt-${fname}.service ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then
copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" /usr/lib/systemd/system/
if [ -f /bin/systemctl ]; then
if [ ! -f /usr/lib/systemd/system/salt-${fname}.service ] || ([ -f /usr/lib/systemd/system/salt-${fname}.service ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then
copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" /usr/lib/systemd/system/
fi

# Skip salt-api since the service should be opt-in and not necessarily started on boot
[ $fname = "api" ] && continue

/bin/systemctl enable salt-${fname}.service
SYSTEMD_RELOAD=$BS_TRUE
elif [ ! -f /usr/lib/systemd/system/salt-${fname}.service ] && [ ! -f /etc/init.d/salt-$fname ] || ([ -f /etc/init.d/salt-$fname ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then

elif [ ! -f /etc/init.d/salt-$fname ] || ([ -f /etc/init.d/salt-$fname ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then
copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}" /etc/init.d/
chmod +x /etc/init.d/salt-${fname}

Expand Down Expand Up @@ -3373,6 +3384,12 @@ install_arch_linux_stable_deps() {
pacman-key --init && pacman-key --populate archlinux || return 1
fi

pacman -Sy --noconfirm --needed pacman || return 1

if [ "$(which pacman-db-upgrade)" != "" ]; then
pacman-db-upgrade || return 1
fi

if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then
pacman -Syyu --noconfirm --needed || return 1
fi
Expand All @@ -3392,9 +3409,8 @@ install_arch_linux_stable_deps() {
install_arch_linux_git_deps() {
install_arch_linux_stable_deps

pacman -Sy --noconfirm --needed pacman || return 1
# Don't fail if un-installing python2-distribute threw an error
pacman -R --noconfirm --needed python2-distribute
pacman -R --noconfirm python2-distribute
pacman -Sy --noconfirm --needed git python2-crypto python2-setuptools python2-jinja \
python2-m2crypto python2-markupsafe python2-msgpack python2-psutil python2-yaml \
python2-pyzmq zeromq python2-requests python2-systemd || return 1
Expand Down Expand Up @@ -3623,6 +3639,10 @@ install_freebsd_9_stable_deps() {
/usr/local/sbin/pkg install ${SALT_PKG_FLAGS} -y ${_EXTRA_PACKAGES} || return 1
fi

if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then
pkg upgrade -y || return 1
fi

return 0
}

Expand Down

0 comments on commit a48e565

Please sign in to comment.