diff options
author | Martin Schwenke <martin@meltin.net> | 2017-01-09 15:19:26 +1100 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2017-01-16 11:57:08 +0100 |
commit | a9870538c9876072bcd4b5f9b907a256d8737249 (patch) | |
tree | adada5a65cb87484ac4486e5d1cf897474080863 /ctdb/config | |
parent | c8249dfa0e72ece7d816ecf822a78843deabfeaa (diff) | |
download | samba-a9870538c9876072bcd4b5f9b907a256d8737249.tar.gz |
ctdb-scripts: Drop function ctdb_check_command()
This is only used in 1 place, so just inline the check.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/config')
-rwxr-xr-x | ctdb/config/events.d/49.winbind | 6 | ||||
-rwxr-xr-x | ctdb/config/functions | 15 |
2 files changed, 5 insertions, 16 deletions
diff --git a/ctdb/config/events.d/49.winbind b/ctdb/config/events.d/49.winbind index c9d7aca2bc9..5e937378295 100755 --- a/ctdb/config/events.d/49.winbind +++ b/ctdb/config/events.d/49.winbind @@ -48,7 +48,11 @@ shutdown) ;; monitor) - ctdb_check_command wbinfo -p + if ! out=$(wbinfo -p 2>&1) ; then + echo "ERROR: wbinfo -p returned error" + echo "$out" + exit 1 + fi ;; esac diff --git a/ctdb/config/functions b/ctdb/config/functions index 44e542ae11c..9b0c3207533 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -408,21 +408,6 @@ ctdb_check_unix_socket() { fi } -###################################################### -# check a command returns zero status -# usage: ctdb_check_command <command> -###################################################### -ctdb_check_command () -{ - _out=$("$@" 2>&1) || { - echo "ERROR: $* returned error" - if [ -n "$_out" ] ; then - debug "$_out" - fi - exit 1 - } -} - ################################################ # kill off any TCP connections with the given IP ################################################ |