[fix] sed masks command return code, remove

This commit is contained in:
William Wernert
2020-12-02 13:54:02 -05:00
parent 8fe43d6d56
commit cc5d54764a

View File

@@ -274,9 +274,10 @@ check_salt_master_status() {
salt-call state.show_top > /dev/null 2>&1 salt-call state.show_top > /dev/null 2>&1
local status=$? local status=$?
if [ $status -gt 0 ]; then if [ $status -gt 0 ]; then
echo " Could not talk to salt master" >> "$setup_log" 2>&1
return 1; return 1;
else else
echo "Can talk to salt master" >> "$setup_log" 2>&1 echo " Can talk to salt master" >> "$setup_log" 2>&1
return 0; return 0;
fi fi
@@ -284,15 +285,15 @@ check_salt_master_status() {
check_salt_minion_status() { check_salt_minion_status() {
echo "Checking if the salt minion will respond to jobs" >> "$setup_log" 2>&1 echo "Checking if the salt minion will respond to jobs" >> "$setup_log" 2>&1
salt "$MINION_ID" test.ping | sed 's/ERROR/WARNING/' >> "$setup_log" 2>&1 salt "$MINION_ID" test.ping > /dev/null 2>&1
local status=$? local status=$?
if [ $status -gt 0 ]; then if [ $status -gt 0 ]; then
echo " Minion did not respond" >> "$setup_log" 2>&1
return 1; return 1;
else else
echo "Received job response from salt minion" >> "$setup_log" 2>&1 echo " Received job response from salt minion" >> "$setup_log" 2>&1
return 0; return 0;
fi fi
} }
check_soremote_pass() { check_soremote_pass() {