mirror of
https://github.com/samba-team/samba.git
synced 2025-02-08 05:57:51 +03:00
ctdb_check_tcp_ports: fail the check if neither netstat nor netcat/nc is found
Michael (This used to be ctdb commit 25d04bbe9528fafc68751f7beb22daeee3163d34)
This commit is contained in:
parent
ba6612ec12
commit
bbf36eebb9
@ -230,6 +230,10 @@ ctdb_check_tcp_ports() {
|
|||||||
${NETCAT} -z 127.0.0.1 $p > /dev/null || all_ok=0
|
${NETCAT} -z 127.0.0.1 $p > /dev/null || all_ok=0
|
||||||
elif [ "x${NETSTAT}" != "x" ]; then
|
elif [ "x${NETSTAT}" != "x" ]; then
|
||||||
( ${NETSTAT} -a -n | egrep "0.0.0.0:$p .*LISTEN" > /dev/null ) || all_ok=0
|
( ${NETSTAT} -a -n | egrep "0.0.0.0:$p .*LISTEN" > /dev/null ) || all_ok=0
|
||||||
|
else
|
||||||
|
echo "ERROR: neither netcat (or nc) nor netstat found!"
|
||||||
|
echo "ERROR: can't monitor ${service_name} tcp port ${p}"
|
||||||
|
all_ok=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ $all_ok -eq 1 ] || {
|
[ $all_ok -eq 1 ] || {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user