eventscripts: Don't update static routes on "recovered" event
authorMartin Schwenke <martin@meltin.net>
Thu, 17 Oct 2013 05:20:18 +0000 (16:20 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 22 Oct 2013 03:34:05 +0000 (14:34 +1100)
Routes only need to be updated when IPs have moved.  IP takeover runs
will generate "ipreallocated", which is enough.  "recovered" always
follows "ipreallocated" anyway, so avoid the redundancy.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/11.routing

index f3e972b16d4c27690756b4a310c29f8ed81df27d..ccc60e7c9b294524f3c42de22f41ac37df271f53 100755 (executable)
@@ -23,7 +23,7 @@ loadconfig
 }
 
 case "$1" in
-    recovered|ipreallocated)
+    ipreallocated)
         while read iface dest gw; do
             ip route add "$dest" via "$gw" dev "$iface" >/dev/null 2>&1
         done <"${CTDB_BASE}/static-routes"