ctdb-scripts: Ignore shellcheck SC2181 warning (use of $?)
authorMartin Schwenke <martin@meltin.net>
Fri, 11 Aug 2017 02:49:32 +0000 (12:49 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 14 Aug 2017 03:15:25 +0000 (05:15 +0200)
commitb71becc1501f70f26ab854460d6f833d8f4b5302
tree35fbda8effc5756092d277c8d082eb8a93da180f
parent2b0e266d07cf62c1cbbda182aae6cdc93777cb3b
ctdb-scripts: Ignore shellcheck SC2181 warning (use of $?)

Given the size of the command substitutions it would be less clear to
embed the assignments and substitutions inside a conditional.  It is
clearer if the exit code is checked afterwards.

However, do fix some untidy uses of != instead of -ne when comparing
with $?.  Make the code easier to understand by reversing the logic
and using -eq and ||.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/debug-hung-script.sh
ctdb/tools/ctdb_diagnostics
ctdb/tools/onnode