ctdb: use properly configured ctdb in 13.per_ip_routing
authorMichael Adam <obnox@samba.org>
Wed, 8 Jun 2016 11:23:07 +0000 (13:23 +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/13.per_ip_routing

index 56dfc348df431a71cd6b636266efee6f4cbd2fca..cfcd484a8c85ddc0e9c4960cffb2ab1bff5c398e 100755 (executable)
@@ -292,7 +292,7 @@ flush_rules_and_routes ()
 # routes.
 add_missing_routes ()
 {
-    ctdb ip -v -X | {
+    $CTDB ip -v -X | {
        read _x # skip header line
 
        # Read the rest of the lines.  We're only interested in the
@@ -319,7 +319,7 @@ add_missing_routes ()
 remove_bogus_routes ()
 {
     # Get a IPs current hosted by this node, each anchored with '@'.
-    _ips=$(ctdb ip -v -X | awk -F'|' 'NR > 1 && $4 != "" {printf "@%s@\n", $2}')
+    _ips=$($CTDB ip -v -X | awk -F'|' 'NR > 1 && $4 != "" {printf "@%s@\n", $2}')
 
     ip rule show |
     while read _p _x _i _x _t ; do
@@ -382,7 +382,7 @@ case "$1" in
        # flush our route cache
        set_proc sys/net/ipv4/route/flush 1
 
-       ctdb gratiousarp "$ip" "$iface"
+       $CTDB gratiousarp "$ip" "$iface"
        ;;
 
     updateip)
@@ -397,7 +397,7 @@ case "$1" in
        # flush our route cache
        set_proc sys/net/ipv4/route/flush 1
 
-       ctdb gratiousarp "$ip" "$niface"
+       $CTDB gratiousarp "$ip" "$niface"
        tickle_tcp_connections "$ip"
        ;;