ctdb: use properly configured ctdb in 10.interfaces
authorMichael Adam <obnox@samba.org>
Wed, 8 Jun 2016 10:37:00 +0000 (12:37 +0200)
committerMartin Schwenke <martins@samba.org>
Sat, 11 Jun 2016 04:20:14 +0000 (06:20 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/config/events.d/10.interface

index bdb94430a06fda09d7108603626446ee9d433911..204f4c650bdd7b66aa13ec3106b22c2638d28393 100755 (executable)
@@ -33,7 +33,7 @@ get_all_interfaces ()
 
     # 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 -X ifaces | sed -e '1d' -e 's@^|@@' -e 's@|.*@@')
+    ctdb_ifaces=$($CTDB -X ifaces | sed -e '1d' -e 's@^|@@' -e 's@|.*@@')
 
     # Add $ctdb_interfaces and uniquify
     all_interfaces=$(echo $all_interfaces $ctdb_ifaces | tr ' ' '\n' | sort -u)
@@ -52,10 +52,10 @@ monitor_interfaces()
        for _iface in $all_interfaces ; do
                if interface_monitor "$_iface" ; then
                        up_interfaces_found=true
-                       ctdb setifacelink "$_iface" up >/dev/null 2>&1
+                       $CTDB setifacelink "$_iface" up >/dev/null 2>&1
                else
                        down_interfaces_found=true
-                       ctdb setifacelink "$_iface" down >/dev/null 2>&1
+                       $CTDB setifacelink "$_iface" down >/dev/null 2>&1
                fi
        done
 
@@ -233,7 +233,7 @@ case "$1" in
        flush_route_cache
 
        # propagate the new mac address
-       ctdb gratiousarp $ip $niface
+       $CTDB gratiousarp $ip $niface
 
        # tickle all existing connections, so that dropped packets
        # are retransmited and the tcp streams work