ctdb-scripts: Rename get_real_iface() -> interface_get_real()
authorMartin Schwenke <martin@meltin.net>
Fri, 18 Dec 2015 04:37:31 +0000 (15:37 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 25 Jan 2016 06:18:24 +0000 (07:18 +0100)
Now suitably named for move to functions file.

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

index a6ecf82c348ce692ab69808f119abcad85203b38..428c23b3cab34fa2fe501e0e7821e05f027530ba 100755 (executable)
@@ -52,7 +52,9 @@ get_all_interfaces ()
     all_interfaces=$(echo $all_interfaces $ctdb_ifaces | tr ' ' '\n' | sort -u)
 }
 
-get_real_iface ()
+# If the interface is a virtual one (e.g. VLAN) then get the
+# underlying interface
+interface_get_real ()
 {
     # Output of "ip link show <iface>"
     _iface_info="$1"
@@ -89,7 +91,7 @@ interface_monitor ()
 
     # If the interface is a virtual one (e.g. VLAN) then get the
     # underlying interface.
-    _realiface=$(get_real_iface "$_iface_info")
+    _realiface=$(interface_get_real "$_iface_info")
 
     if _bi=$(get_proc "net/bonding/${_realiface}" 2>/dev/null) ; then
        # This is a bond: various monitoring strategies