summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xctdb/config/events.d/11.routing11
1 files changed, 11 insertions, 0 deletions
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 "$@"
;;