mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Fixed echo output for parentheses
This commit is contained in:
parent
70f5b8b6a6
commit
7568b2bf43
1 changed files with 29 additions and 29 deletions
|
@ -2108,7 +2108,7 @@ __copyfile() {
|
|||
dfile=$2
|
||||
overwrite=$3
|
||||
else
|
||||
echoerror "Wrong number of arguments for __copyfile\(\)"
|
||||
echoerror "Wrong number of arguments for __copyfile()"
|
||||
echoinfo "USAGE: __copyfile <source> <dest> OR __copyfile <source> <dest> <overwrite>"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -2156,7 +2156,7 @@ __movefile() {
|
|||
dfile=$2
|
||||
overwrite=$3
|
||||
else
|
||||
echoerror "Wrong number of arguments for __movefile\(\)"
|
||||
echoerror "Wrong number of arguments for __movefile()"
|
||||
echoinfo "USAGE: __movefile <source> <dest> OR __movefile <source> <dest> <overwrite>"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -2213,7 +2213,7 @@ __linkfile() {
|
|||
linkname=$2
|
||||
overwrite=$3
|
||||
else
|
||||
echoerror "Wrong number of arguments for __linkfile\(\)"
|
||||
echoerror "Wrong number of arguments for __linkfile()"
|
||||
echoinfo "USAGE: __linkfile <target> <link> OR __linkfile <tagret> <link> <overwrite>"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -2258,7 +2258,7 @@ __overwriteconfig() {
|
|||
target=$1
|
||||
json=$2
|
||||
else
|
||||
echoerror "Wrong number of arguments for __convert_json_to_yaml_str\(\)"
|
||||
echoerror "Wrong number of arguments for __convert_json_to_yaml_str()"
|
||||
echoinfo "USAGE: __convert_json_to_yaml_str <configfile> <jsonstring>"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -2542,7 +2542,7 @@ __install_pip_pkgs() {
|
|||
#----------------------------------------------------------------------------------------------------------------------
|
||||
__install_tornado_pip() {
|
||||
# OS needs tornado <5.0 from pip
|
||||
__check_pip_allowed "You need to allow pip based installations \(-P\) for Tornado <5.0 in order to install Salt on Python 3"
|
||||
__check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt on Python 3"
|
||||
## install pip if its not installed and install tornado
|
||||
__install_pip_pkgs "tornado<5.0" "${1}" || return 1
|
||||
}
|
||||
|
@ -3620,7 +3620,7 @@ install_fedora_git_deps() {
|
|||
# Fedora 28+ needs tornado <5.0 from pip
|
||||
# https://github.com/saltstack/salt-bootstrap/issues/1220
|
||||
if [ "${PY_PKG_VER}" -eq 3 ] && [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then
|
||||
__check_pip_allowed "You need to allow pip based installations \(-P\) for Tornado <5.0 in order to install Salt on Python 3"
|
||||
__check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt on Python 3"
|
||||
grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" | while IFS='
|
||||
' read -r dep; do
|
||||
"${_PY_EXE}" -m pip install "${dep}" || return 1
|
||||
|
@ -4793,7 +4793,7 @@ install_amazon_linux_ami_git_deps() {
|
|||
__PIP_PACKAGES=""
|
||||
|
||||
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
|
||||
__check_pip_allowed "You need to allow pip based installations \(-P\) in order to install apache-libcloud"
|
||||
__check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud"
|
||||
__PACKAGES="${__PACKAGES} python27-pip"
|
||||
__PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
|
||||
fi
|
||||
|
@ -4858,7 +4858,7 @@ install_amazon_linux_ami_2_git_deps() {
|
|||
__PIP_PACKAGES=""
|
||||
|
||||
if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then
|
||||
__check_pip_allowed "You need to allow pip based installations \(-P\) in order to install apache-libcloud"
|
||||
__check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud"
|
||||
if [ "$PARSED_VERSION" -eq "2" ]; then
|
||||
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq "3" ]; then
|
||||
__PACKAGES="${__PACKAGES} python3-pip"
|
||||
|
@ -5590,11 +5590,11 @@ install_smartos_git_deps() {
|
|||
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then
|
||||
# Install whichever tornado is in the requirements file
|
||||
__REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")"
|
||||
__check_pip_allowed "You need to allow pip based installations \(-P\) in order to install the python package '${__REQUIRED_TORNADO}'"
|
||||
__check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'"
|
||||
|
||||
# Install whichever futures is in the requirements file
|
||||
__REQUIRED_FUTURES="$(grep futures "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")"
|
||||
__check_pip_allowed "You need to allow pip based installations \(-P\) in order to install the python package '${__REQUIRED_FUTURES}'"
|
||||
__check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_FUTURES}'"
|
||||
|
||||
if [ "${__REQUIRED_TORNADO}" != "" ]; then
|
||||
if ! __check_command_exists pip; then
|
||||
|
@ -6719,7 +6719,7 @@ config_salt() {
|
|||
[ "$_TEMP_CONFIG_DIR" = "null" ] && return
|
||||
|
||||
if [ "$_CONFIG_ONLY" -eq $BS_TRUE ]; then
|
||||
echowarn "Passing -C \(config only\) option implies -F \(forced overwrite\)."
|
||||
echowarn "Passing -C (config only) option implies -F (forced overwrite)."
|
||||
|
||||
if [ "$_FORCE_OVERWRITE" -ne $BS_TRUE ]; then
|
||||
echowarn "Overwriting configs in 11 seconds!"
|
||||
|
@ -7099,9 +7099,9 @@ fi
|
|||
# Install dependencies
|
||||
if [ ${_NO_DEPS} -eq $BS_FALSE ] && [ $_CONFIG_ONLY -eq $BS_FALSE ]; then
|
||||
# Only execute function is not in config mode only
|
||||
echoinfo "Running ${DEPS_INSTALL_FUNC}\(\)"
|
||||
echoinfo "Running ${DEPS_INSTALL_FUNC}()"
|
||||
if ! ${DEPS_INSTALL_FUNC}; then
|
||||
echoerror "Failed to run ${DEPS_INSTALL_FUNC}\(\)!!!"
|
||||
echoerror "Failed to run ${DEPS_INSTALL_FUNC}()!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
@ -7123,9 +7123,9 @@ if [ "$_CUSTOM_MASTER_CONFIG" != "null" ] || [ "$_CUSTOM_MINION_CONFIG" != "null
|
|||
|
||||
if [ ${_NO_DEPS} -eq $BS_FALSE ] && [ $_CONFIG_ONLY -eq $BS_TRUE ]; then
|
||||
# Execute function to satisfy dependencies for configuration step
|
||||
echoinfo "Running ${DEPS_INSTALL_FUNC}\(\)"
|
||||
echoinfo "Running ${DEPS_INSTALL_FUNC}()"
|
||||
if ! ${DEPS_INSTALL_FUNC}; then
|
||||
echoerror "Failed to run ${DEPS_INSTALL_FUNC}\(\)!!!"
|
||||
echoerror "Failed to run ${DEPS_INSTALL_FUNC}()!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
@ -7133,9 +7133,9 @@ fi
|
|||
|
||||
# Configure Salt
|
||||
if [ "$CONFIG_SALT_FUNC" != "null" ] && [ "$_TEMP_CONFIG_DIR" != "null" ]; then
|
||||
echoinfo "Running ${CONFIG_SALT_FUNC}\(\)"
|
||||
echoinfo "Running ${CONFIG_SALT_FUNC}()"
|
||||
if ! ${CONFIG_SALT_FUNC}; then
|
||||
echoerror "Failed to run ${CONFIG_SALT_FUNC}\(\)!!!"
|
||||
echoerror "Failed to run ${CONFIG_SALT_FUNC}()!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
@ -7156,9 +7156,9 @@ fi
|
|||
|
||||
# Pre-seed master keys
|
||||
if [ "$PRESEED_MASTER_FUNC" != "null" ] && [ "$_TEMP_KEYS_DIR" != "null" ]; then
|
||||
echoinfo "Running ${PRESEED_MASTER_FUNC}\(\)"
|
||||
echoinfo "Running ${PRESEED_MASTER_FUNC}()"
|
||||
if ! ${PRESEED_MASTER_FUNC}; then
|
||||
echoerror "Failed to run ${PRESEED_MASTER_FUNC}\(\)!!!"
|
||||
echoerror "Failed to run ${PRESEED_MASTER_FUNC}()!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
@ -7166,49 +7166,49 @@ fi
|
|||
# Install Salt
|
||||
if [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then
|
||||
# Only execute function is not in config mode only
|
||||
echoinfo "Running ${INSTALL_FUNC}\(\)"
|
||||
echoinfo "Running ${INSTALL_FUNC}()"
|
||||
if ! ${INSTALL_FUNC}; then
|
||||
echoerror "Failed to run ${INSTALL_FUNC}\(\)!!!"
|
||||
echoerror "Failed to run ${INSTALL_FUNC}()!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run any post install function. Only execute function if not in config mode only
|
||||
if [ "$POST_INSTALL_FUNC" != "null" ] && [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then
|
||||
echoinfo "Running ${POST_INSTALL_FUNC}\(\)"
|
||||
echoinfo "Running ${POST_INSTALL_FUNC}()"
|
||||
if ! ${POST_INSTALL_FUNC}; then
|
||||
echoerror "Failed to run ${POST_INSTALL_FUNC}\(\)!!!"
|
||||
echoerror "Failed to run ${POST_INSTALL_FUNC}()!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run any check services function, Only execute function if not in config mode only
|
||||
if [ "$CHECK_SERVICES_FUNC" != "null" ] && [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then
|
||||
echoinfo "Running ${CHECK_SERVICES_FUNC}\(\)"
|
||||
echoinfo "Running ${CHECK_SERVICES_FUNC}()"
|
||||
if ! ${CHECK_SERVICES_FUNC}; then
|
||||
echoerror "Failed to run ${CHECK_SERVICES_FUNC}\(\)!!!"
|
||||
echoerror "Failed to run ${CHECK_SERVICES_FUNC}()!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run any start daemons function
|
||||
if [ "$STARTDAEMONS_INSTALL_FUNC" != "null" ] && [ ${_START_DAEMONS} -eq $BS_TRUE ]; then
|
||||
echoinfo "Running ${STARTDAEMONS_INSTALL_FUNC}\(\)"
|
||||
echoinfo "Running ${STARTDAEMONS_INSTALL_FUNC}()"
|
||||
echodebug "Waiting ${_SLEEP} seconds for processes to settle before checking for them"
|
||||
sleep ${_SLEEP}
|
||||
if ! ${STARTDAEMONS_INSTALL_FUNC}; then
|
||||
echoerror "Failed to run ${STARTDAEMONS_INSTALL_FUNC}\(\)!!!"
|
||||
echoerror "Failed to run ${STARTDAEMONS_INSTALL_FUNC}()!!!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if the installed daemons are running or not
|
||||
if [ "$DAEMONS_RUNNING_FUNC" != "null" ] && [ ${_START_DAEMONS} -eq $BS_TRUE ]; then
|
||||
echoinfo "Running ${DAEMONS_RUNNING_FUNC}\(\)"
|
||||
echoinfo "Running ${DAEMONS_RUNNING_FUNC}()"
|
||||
echodebug "Waiting ${_SLEEP} seconds for processes to settle before checking for them"
|
||||
sleep ${_SLEEP} # Sleep a little bit to let daemons start
|
||||
if ! ${DAEMONS_RUNNING_FUNC}; then
|
||||
echoerror "Failed to run ${DAEMONS_RUNNING_FUNC}\(\)!!!"
|
||||
echoerror "Failed to run ${DAEMONS_RUNNING_FUNC}()!!!"
|
||||
|
||||
for fname in api master minion syndic; do
|
||||
# Skip salt-api since the service should be opt-in and not necessarily started on boot
|
||||
|
|
Loading…
Add table
Reference in a new issue