diff options
author | Ronnie Sahlberg <sahlberg@ronnie> | 2007-07-15 09:26:54 +1000 |
---|---|---|
committer | Ronnie Sahlberg <sahlberg@ronnie> | 2007-07-15 09:26:54 +1000 |
commit | 4c276ded1f37cc23d5c7588e67e60bd8794dca13 (patch) | |
tree | d3ffd92372b41ded61ae59cbb90b875fb112515b /ctdb/config/functions | |
parent | 3890fde07f26e5ff9672b830186f2008b2c30913 (diff) | |
download | samba-4c276ded1f37cc23d5c7588e67e60bd8794dca13.tar.gz samba-4c276ded1f37cc23d5c7588e67e60bd8794dca13.tar.xz samba-4c276ded1f37cc23d5c7588e67e60bd8794dca13.zip |
if we dont have nc or netcat, try using netstat as a final attempt to
check for tcp ports
(the check for these tools should not really use hardcoded paths)
(This used to be ctdb commit 56d77082c07a519dd3804cc24cc7ba889b8469ff)
Diffstat (limited to 'ctdb/config/functions')
-rw-r--r-- | ctdb/config/functions | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ctdb/config/functions b/ctdb/config/functions index 1a6fc5c0c7..378d38ec02 100644 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -69,8 +69,10 @@ ctdb_wait_tcp_ports() { /usr/bin/netcat -z 127.0.0.1 $p || all_ok=0 elif [ -x /usr/bin/nc ]; then /usr/bin/nc -z 127.0.0.1 $p || all_ok=0 + elif [ -x /usr/bin/netstat ]; then + (/usr/bin/netstat -a -n | egrep "0.0.0.0:$p .*LISTEN") || all_ok=0 else - echo "`date` netcat not found - cannot check tcp ports" + echo "`date` - No tool to check tcp ports availabe. can not check in ctdb_wait_tcp_ports" return fi done |