From 7cab8996742b8128bed197f9457afd2af160cf5e Mon Sep 17 00:00:00 2001 From: Carlos Konstanski Date: Wed, 30 Oct 2019 14:33:05 -0600 Subject: initial commit --- bootstrap/run_salt.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bootstrap/run_salt.sh (limited to 'bootstrap/run_salt.sh') diff --git a/bootstrap/run_salt.sh b/bootstrap/run_salt.sh new file mode 100755 index 0000000..47a9a4f --- /dev/null +++ b/bootstrap/run_salt.sh @@ -0,0 +1,24 @@ +#!/bin/bash -e + +working_dir="${1}" +build_basedir="${2}" +local_build="${3}" +python=$(which python2 || false) + +salt_running_p() { + ps -ef | grep -F "salt-call" | grep -v "grep" + return ${?} +} + +while salt_running_p; do + sleep 5 +done + +${python} $(which salt-call) \ + --local \ + --pillar-root=${working_dir}/pillar \ + --file-root=${working_dir}/salt \ + state.highstate \ + pillar="$($(dirname ${0})/pillar_config.rb --build-basedir=${build_basedir} --local-build=${local_build})" + +exit 0 -- cgit v1.3