1717# CREATED: 10/15/2012 09:49:37 PM WEST
1818# ======================================================================================================================
1919set -o nounset # Treat unset variables as an error
20- __ScriptVersion=" 2014.12.11 "
20+ __ScriptVersion=" 2015.01.12 "
2121__ScriptName=" bootstrap-salt.sh"
2222
2323# ======================================================================================================================
@@ -1993,6 +1993,9 @@ install_debian_6_deps() {
19931993
19941994 apt-get update
19951995
1996+ # Make sure wget is available
1997+ __apt_get_install_noinput wget
1998+
19961999 # Install Keys
19972000 __apt_get_install_noinput debian-archive-keyring && apt-get update
19982001
@@ -2090,6 +2093,10 @@ install_debian_7_deps() {
20902093 export DEBIAN_FRONTEND=noninteractive
20912094
20922095 apt-get update
2096+
2097+ # Make sure wget is available
2098+ __apt_get_install_noinput wget
2099+
20932100 # Install Keys
20942101 __apt_get_install_noinput debian-archive-keyring && apt-get update
20952102
@@ -2577,6 +2584,7 @@ install_centos_stable_deps() {
25772584 __install_epel_repository || return 1
25782585
25792586 if [ " $_ENABLE_EXTERNAL_ZMQ_REPOS " -eq $BS_TRUE ]; then
2587+ yum -y install python-hashlib || return 1
25802588 __install_saltstack_copr_zeromq_repository || return 1
25812589 fi
25822590
@@ -2729,15 +2737,18 @@ install_centos_git_post() {
27292737 [ $fname = " api" ] && ([ " $_INSTALL_MASTER " -eq $BS_FALSE ] || [ " $( which salt-${fname} 2> /dev/null) " = " " ]) && continue
27302738 [ $fname = " syndic" ] && [ " $_INSTALL_SYNDIC " -eq $BS_FALSE ] && continue
27312739
2732- if [ ! -f /usr/lib/systemd/system/salt-${fname} .service ] || ([ -f /usr/lib/systemd/system/salt-${fname} .service ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then
2733- copyfile " ${__SALT_GIT_CHECKOUT_DIR} /pkg/rpm/salt-${fname} .service" /usr/lib/systemd/system/
2740+ if [ -f /bin/systemctl ]; then
2741+ if [ ! -f /usr/lib/systemd/system/salt-${fname} .service ] || ([ -f /usr/lib/systemd/system/salt-${fname} .service ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then
2742+ copyfile " ${__SALT_GIT_CHECKOUT_DIR} /pkg/rpm/salt-${fname} .service" /usr/lib/systemd/system/
2743+ fi
27342744
27352745 # Skip salt-api since the service should be opt-in and not necessarily started on boot
27362746 [ $fname = " api" ] && continue
27372747
27382748 /bin/systemctl enable salt-${fname} .service
27392749 SYSTEMD_RELOAD=$BS_TRUE
2740- 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
2750+
2751+ elif [ ! -f /etc/init.d/salt-$fname ] || ([ -f /etc/init.d/salt-$fname ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then
27412752 copyfile " ${__SALT_GIT_CHECKOUT_DIR} /pkg/rpm/salt-${fname} " /etc/init.d/
27422753 chmod +x /etc/init.d/salt-${fname}
27432754
@@ -3373,6 +3384,12 @@ install_arch_linux_stable_deps() {
33733384 pacman-key --init && pacman-key --populate archlinux || return 1
33743385 fi
33753386
3387+ pacman -Sy --noconfirm --needed pacman || return 1
3388+
3389+ if [ " $( which pacman-db-upgrade) " != " " ]; then
3390+ pacman-db-upgrade || return 1
3391+ fi
3392+
33763393 if [ " $_UPGRADE_SYS " -eq $BS_TRUE ]; then
33773394 pacman -Syyu --noconfirm --needed || return 1
33783395 fi
@@ -3392,9 +3409,8 @@ install_arch_linux_stable_deps() {
33923409install_arch_linux_git_deps () {
33933410 install_arch_linux_stable_deps
33943411
3395- pacman -Sy --noconfirm --needed pacman || return 1
33963412 # Don't fail if un-installing python2-distribute threw an error
3397- pacman -R --noconfirm --needed python2-distribute
3413+ pacman -R --noconfirm python2-distribute
33983414 pacman -Sy --noconfirm --needed git python2-crypto python2-setuptools python2-jinja \
33993415 python2-m2crypto python2-markupsafe python2-msgpack python2-psutil python2-yaml \
34003416 python2-pyzmq zeromq python2-requests python2-systemd || return 1
@@ -3623,6 +3639,10 @@ install_freebsd_9_stable_deps() {
36233639 /usr/local/sbin/pkg install ${SALT_PKG_FLAGS} -y ${_EXTRA_PACKAGES} || return 1
36243640 fi
36253641
3642+ if [ " $_UPGRADE_SYS " -eq $BS_TRUE ]; then
3643+ pkg upgrade -y || return 1
3644+ fi
3645+
36263646 return 0
36273647}
36283648
0 commit comments