ctdb-scripts: Add default for public addresses file where missing
authorMartin Schwenke <martin@meltin.net>
Thu, 22 Feb 2018 07:48:23 +0000 (18:48 +1100)
committerMartin Schwenke <martins@samba.org>
Thu, 1 Mar 2018 18:39:14 +0000 (19:39 +0100)
This makes it consistent with the rest of the script code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events.d/13.per_ip_routing
ctdb/config/functions

index d8e02475dff75eb276ef1aeb685c732f4cbf9656..191d947264db6a2afde566a16fe6be82d854a9dc 100755 (executable)
@@ -207,7 +207,7 @@ get_config_for_ip ()
            if [ "$_ip" = "$_i" ] ; then
                printf "%s" "$_ip "; ipv4_host_addr_to_net "$_ip" "$_maskbits"
            fi
-       done <"${CTDB_PUBLIC_ADDRESSES:-/dev/null}"
+       done <"${CTDB_PUBLIC_ADDRESSES:-${CTDB_BASE}/public_addresses}"
     else
        while read _i _rest ; do
            if [ "$_ip" = "$_i" ] ; then
index 3805d480326cb53f26647209f105ae2173cbdd03..68149c6399e0626eac7114b70219fb0b9a7e66c5 100755 (executable)
@@ -592,7 +592,7 @@ drop_all_public_ips ()
        # shellcheck disable=SC2034
        while read _ip _x ; do
                drop_ip "$_ip"
-       done <"${CTDB_PUBLIC_ADDRESSES:-/dev/null}"
+       done <"${CTDB_PUBLIC_ADDRESSES:-${CTDB_BASE}/public_addresses}"
 }
 
 flush_route_cache ()