]> 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)
committerAnoop C S <anoopcs@samba.org>
Fri, 17 Oct 2025 05:25:33 +0000 (05:25 +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>
ctdb/config/functions

index 1d80c61e5f2a986c55b8ce1489b77036c6f52ff3..f5194237843b8cb2a334c14c7e1fd87fa8c1f3b6 100755 (executable)
@@ -630,6 +630,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
 }