diff --git a/ctdb/config/events/legacy/10.interface.script b/ctdb/config/events/legacy/10.interface.script index 72e0c101d47..d87f6c52c58 100755 --- a/ctdb/config/events/legacy/10.interface.script +++ b/ctdb/config/events/legacy/10.interface.script @@ -25,7 +25,8 @@ fi get_all_interfaces () { # Get all the interfaces listed in the public_addresses file - all_interfaces=$(sed -e 's/^[^\t ]*[\t ]*//' \ + all_interfaces=$(sed -e '/^#.*/d' \ + -e 's/^[^\t ]*[\t ]*//' \ -e 's/,/ /g' \ -e 's/[\t ]*$//' "$ctdb_public_addresses") diff --git a/ctdb/config/functions b/ctdb/config/functions index 2395d8d4dc8..a4e73ad0594 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -611,6 +611,9 @@ drop_all_public_ips () # _x is intentionally ignored # shellcheck disable=SC2034 while read _ip _x ; do + case "$_ip" in + \#*) continue ;; + esac drop_ip "$_ip" done <"${CTDB_BASE}/public_addresses" }