From ab6beb6b7fdffd53b8feb84e008562a2ef33d546 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Oct 2010 19:21:23 +0200 Subject: events.d/11.routing: handle "updateip" event metze (This used to be ctdb commit 034635418c7e5274d6bdf4cccc7a10e3b631e2d4) --- ctdb/config/events.d/11.routing | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ctdb/config/events.d/11.routing b/ctdb/config/events.d/11.routing index c265c382d0..9a1fdef788 100755 --- a/ctdb/config/events.d/11.routing +++ b/ctdb/config/events.d/11.routing @@ -27,6 +27,17 @@ case "$1" in done ;; + updateip) + oiface=$2 + niface=$3 + cat $CTDB_BASE/static-routes | egrep "^$niface " | while read IFACE DEST GW; do + ip route add $DEST via $GW dev $IFACE >/dev/null 2>/dev/null + done + cat $CTDB_BASE/static-routes | egrep "^$oiface " | while read IFACE DEST GW; do + ip route add $DEST via $GW dev $IFACE >/dev/null 2>/dev/null + done + ;; + *) ctdb_standard_event_handler "$@" ;; -- cgit