From b559e5dd326a56e5ab8fcb4fee93f47187fd61ec Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 14 Sep 2020 12:40:39 -0400 Subject: [PATCH] change how we determine how to run so-status --- salt/common/tools/sbin/so-status | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-status b/salt/common/tools/sbin/so-status index b3aa582ce..276720b8b 100755 --- a/salt/common/tools/sbin/so-status +++ b/salt/common/tools/sbin/so-status @@ -27,6 +27,7 @@ ERROR_STRING="ERROR" SUCCESS_STRING="OK" PENDING_STRING="PENDING" MISSING_STRING='MISSING' +CALLER=$(ps -o comm= $PPID) declare -a BAD_STATUSES=("removing" "paused" "exited" "dead") declare -a PENDING_STATUSES=("paused" "created" "restarting") declare -a GOOD_STATUSES=("running") @@ -167,7 +168,7 @@ non_term_print_line() { main() { # if running from salt - if [ "$TERM" == 'dumb' ]; then + if [ "$CALLER" == 'salt-call' ] || [ "$CALLER" == 'salt-minion' ]; then printf "\n" printf "Checking Docker status\n\n"