mirror of
https://github.com/samba-team/samba.git
synced 2025-03-22 02:50:28 +03:00
eventscripts: Get list of configured interfaces using "ctdb ifaces"
This was previosuly changed because ctdbd didn't garbage collect orphaned interfaces. This was fixed in commit cc1a3ae911d3fee8b87fda5de5ab6d9499d7510a. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c6ab0f9405d5fa5b0b1693bc92e59da0d555a9d7)
This commit is contained in:
parent
a3bef911f3
commit
4b5c9c7991
@ -44,9 +44,9 @@ get_all_interfaces ()
|
||||
[ "$CTDB_PUBLIC_INTERFACE" ] && all_interfaces="$CTDB_PUBLIC_INTERFACE $all_interfaces"
|
||||
[ "$CTDB_NATGW_PUBLIC_IFACE" ] && all_interfaces="$CTDB_NATGW_PUBLIC_IFACE $all_interfaces"
|
||||
|
||||
# Get the configured interfaces for each IP. That is, for all but
|
||||
# the 1st line, get the last field with commas changed to spaces.
|
||||
ctdb_ifaces=$(ctdb -Y ip -v | sed -e '1d' -e 's/:$//' -e 's/^.*://' -e 's/,/ /g')
|
||||
# Get the interfaces for which CTDB has public IPs configured.
|
||||
# That is, for all but the 1st line, get the 1st field.
|
||||
ctdb_ifaces=$(ctdb -Y ifaces | sed -e '1d' -e 's@^:@@' -e 's@:.*@@')
|
||||
|
||||
# Add $ctdb_interfaces and uniquify
|
||||
all_interfaces=$(echo $all_interfaces $ctdb_ifaces | tr ' ' '\n' | sort -u)
|
||||
|
Loading…
x
Reference in New Issue
Block a user