mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Switch errors for warnings and exit 1
for exit 0
on some edge cases.
Warn the users when nothing is going to be installed and `exit 0`. Warn the users when nothing was configured and it was supposed to configure, then `exit 0`. This simplifies other applications using the script, namely salty-vagrant.
This commit is contained in:
parent
83fb7ce384
commit
c81e40b89a
1 changed files with 4 additions and 4 deletions
|
@ -205,8 +205,8 @@ __check_unparsed_options() {
|
|||
|
||||
# Check that we're actually installing one of minion/master/syndic
|
||||
if [ $INSTALL_MINION -eq $BS_FALSE ] && [ $INSTALL_MASTER -eq $BS_FALSE ] && [ $INSTALL_SYNDIC -eq $BS_FALSE ] && [ $CONFIG_ONLY -eq $BS_FALSE ]; then
|
||||
echoerror "Nothing to install or configure"
|
||||
exit 1
|
||||
echowarn "Nothing to install or configure"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $CONFIG_ONLY -eq $BS_TRUE ] && [ "$TEMP_CONFIG_DIR" = "null" ]; then
|
||||
|
@ -2021,8 +2021,8 @@ config_salt() {
|
|||
fi
|
||||
|
||||
if [ $CONFIG_ONLY -eq $BS_TRUE ] && [ $CONFIGURED_ANYTHING -eq $BS_FALSE ]; then
|
||||
echoerror "No configuration or keys were copied over. No configuration was done!"
|
||||
exit 1
|
||||
echowarn "No configuration or keys were copied over. No configuration was done!"
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue