From c81e40b89a5690ab4cc5f0516f8911b90224d34e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 6 Mar 2013 23:10:51 +0000 Subject: [PATCH] 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. --- bootstrap-salt.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 26cbf7a..47d34da 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -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 } #