]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Avoid printing a message if no connections
authorMartin Schwenke <mschwenke@ddn.com>
Thu, 16 Oct 2025 02:51:27 +0000 (13:51 +1100)
committerJule Anger <janger@samba.org>
Wed, 22 Oct 2025 09:51:19 +0000 (09:51 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15935

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
(cherry picked from commit 01d3d25c0139a3dd49a2322a9416698d08733377)

ctdb/config/functions

index 4139059a3d3c5b51d6e33cc20abd60ace0e47a85..d61852a8161704368c2a1af7a520555521280221 100755 (executable)
@@ -594,6 +594,10 @@ tickle_tcp_connections()
        _conns=$(get_tcp_connections_for_ip "$_ip" |
                awk '{ print $1, $2 ; print $2, $1 }')
 
+       if [ -z "$_conns" ]; then
+               return
+       fi
+
        echo "$_conns" | awk '{ print "Tickle TCP connection", $1, $2 }'
        echo "$_conns" | ctdb tickle
 }