From 91e0542daacba4a1548025a6168864cf0aa01753 Mon Sep 17 00:00:00 2001 From: Carsten Ehbrecht Date: Tue, 28 Oct 2014 17:03:29 +0100 Subject: [PATCH] reset boostrap-salt.sh to latest of develop --- bootstrap-salt.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ff89d91..7c38971 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -243,6 +243,7 @@ usage() { -D Show debug output. -c Temporary configuration directory -g Salt repository URL. (default: git://github.com/saltstack/salt.git) + -G Insteady of cloning from git://github.com/saltstack/salt.git, clone from https://github.com/saltstack/salt.git (Usually necessary on systems which have the regular git protocol port blocked, where https usualy is not) -k Temporary directory holding the minion keys which will pre-seed the master. -s Sleep time used when waiting for daemons to start, restart and when checking @@ -278,7 +279,7 @@ EOT } # ---------- end of function usage ---------- -while getopts ":hvnDc:g:k:MSNXCPFUKIA:i:Lp:H:Z" opt +while getopts ":hvnDc:Gg:k:MSNXCPFUKIA:i:Lp:H:Z" opt do case "${opt}" in @@ -299,6 +300,8 @@ do fi ;; g ) _SALT_REPO_URL=$OPTARG ;; + G ) _SALTSTACK_REPO_URL="https://github.com/saltstack/salt.git" + ;; k ) _TEMP_KEYS_DIR="$OPTARG" # If the configuration directory does not exist, error out if [ ! -d "$_TEMP_KEYS_DIR" ]; then @@ -979,12 +982,11 @@ __debian_derivatives_translation() { # If the file does not exist, return [ ! -f /etc/os-release ] && return - DEBIAN_DERIVATIVES="(kali|linuxmint)" + DEBIAN_DERIVATIVES="(kali)" # Mappings kali_1_debian_base="7.0" - linuxmint_1_debian_base="8.0" - # Detect derivates, Kali and Linux Mint *only* for now + # Detect derivates, Kali *only* for now rv=$(grep ^ID= /etc/os-release | sed -e 's/.*=//') # Translate Debian derivatives to their base Debian version @@ -996,10 +998,6 @@ __debian_derivatives_translation() { _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="kali" ;; - linuxmint) - _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') - _debian_derivative="linuxmint" - ;; esac _debian_version=$(eval echo "\$${_debian_derivative}_${_major}_debian_base") @@ -1135,7 +1133,7 @@ __git_clone_and_checkout() { local __SALT_GIT_CHECKOUT_PARENT_DIR=$(dirname "${__SALT_GIT_CHECKOUT_DIR}" 2>/dev/null) __SALT_GIT_CHECKOUT_PARENT_DIR="${__SALT_GIT_CHECKOUT_PARENT_DIR:-/tmp/git}" local __SALT_CHECKOUT_REPONAME="$(basename "${__SALT_GIT_CHECKOUT_DIR}" 2>/dev/null)" - __SALT_CHECKOUT_REPONAME="${__SALT_CHECKOUT_REPONAME:-salt}" + __SALT_CHECKOUT_REPONAME="${__SALT_CHECKOUT_REPONAME:-salt}" [ -d "${__SALT_GIT_CHECKOUT_PARENT_DIR}" ] || mkdir "${__SALT_GIT_CHECKOUT_PARENT_DIR}" cd "${__SALT_GIT_CHECKOUT_PARENT_DIR}" if [ -d "${__SALT_GIT_CHECKOUT_DIR}" ]; then @@ -2434,7 +2432,7 @@ install_fedora_stable_post() { install_fedora_git_deps() { install_fedora_deps || return 1 - yum install -y git || return 1 + yum install -y git systemd-python || return 1 __git_clone_and_checkout || return 1 @@ -3578,7 +3576,7 @@ __configure_freebsd_pkg_details() { copyfile $conf_file /etc/pkg/FreeBSD.conf SALT_PKG_FLAGS="-r FreeBSD" ## ensure future ports builds use pkgng - echo "WITH_PKGNG= yes" >> /etc/make.conf + echo "WITH_PKGNG= yes" >> /etc/make.conf } install_freebsd_9_stable_deps() {