ctdb-scripts: Don't remove temporary files before use
authorMartin Schwenke <martin@meltin.net>
Thu, 10 Dec 2015 03:58:53 +0000 (14:58 +1100)
committerMichael Adam <obnox@samba.org>
Tue, 12 Jan 2016 18:16:18 +0000 (19:16 +0100)
They will be clobbered by the redirect anyway.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/config/functions

index eef8f7e38abc444f6fa25a23e5240d2649bdd0c6..b41337ffbf7040c6aab6e9cc412a4bf810f8158e 100755 (executable)
@@ -1084,7 +1084,6 @@ update_tickles ()
 
        # Record connections to our public IPs in a temporary file
        _my_connections="${tickledir}/${_port}.connections"
-       rm -f "$_my_connections"
        netstat -tn |
        awk -v destpat="^${_ipschoice}:${_port}\$" \
          '$1 == "tcp" && $6 == "ESTABLISHED" && $4 ~ destpat {print $5, $4}' |
@@ -1092,7 +1091,6 @@ update_tickles ()
 
        # Record our current tickles in a temporary file
        _my_tickles="${tickledir}/${_port}.tickles"
-       rm -f "$_my_tickles"
        for _i in $_ips ; do
                ctdb -X gettickles $_i $_port |
                awk -F'|' 'NR > 1 { printf "%s:%s %s:%s\n", $2, $3, $4, $5 }'