Eventscripts - generalise TCP port checking plus new nmap-based checker
authorMartin Schwenke <martin@meltin.net>
Wed, 17 Aug 2011 02:12:20 +0000 (12:12 +1000)
committerMartin Schwenke <martin@meltin.net>
Fri, 19 Aug 2011 04:07:33 +0000 (14:07 +1000)
commit536ce3ead42e1b519888003b311d4eb2a61a8daa
tree7bf9bb78c99a26dcdc6dd1de7404d04e1883158f
parentd84c171a9ca18f9fe1f71a3fd329e77a012a1481
Eventscripts - generalise TCP port checking plus new nmap-based checker

Split the netstat-specific parts of ctdb_check_tcp_ports() into new
function ctdb_check_tcp_ports_netstat().

Implement new ctdb_check_tcp_ports_nmap() function that uses
"nmap -PS" to check if the desired ports are listening.

ctdb_check_ctdb_ports() now uses new configuration variable
CTDB_TCP_PORT_CHECKERS to decide which port checkers to try.  Default
value is currently "nmap netstat".  If nmap is not found then this
will fall back to netstat.  This indicates that either nmap should be
installed or the default value of CTDB_TCP_PORT_CHECKERS should be
changed (in a configuration file) to avoid trying to use nmap.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/functions