From 1aff2f87469e11b30a45d3040b251335285e7bb3 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Sat, 18 Mar 2017 21:55:04 +1100 Subject: [PATCH] ctdb-scripts: Switch ctdb_check_unix_socket() to use ss Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/config/functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ctdb/config/functions b/ctdb/config/functions index e31a095ab27..3805d480326 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -387,7 +387,8 @@ ctdb_check_unix_socket() return 1 fi - if ! netstat --unix -a -n | grep -q "^unix.*LISTEN.*${_sockpath}$"; then + _out=$(ss -l -x "src ${_sockpath}" | tail -n +2) + if [ -z "$_out" ] ; then echo "ERROR: ${service_name} not listening on ${_sockpath}" return 1 fi -- 2.11.4.GIT