mirror of
https://github.com/samba-team/samba.git
synced 2025-01-07 17:18:11 +03:00
ctdb-scripts: filter out comments in public_addresses file
Note that order of sed expressions matters: the expression to delete
comment lines must come first as the second expression would transform
# comment
to
comment
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14826
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 530e8d4b9e
)
This commit is contained in:
parent
edf50886ec
commit
a200f88452
@ -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")
|
||||
|
||||
|
@ -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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user