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>
;;
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
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
################################################