diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-10-19 19:21:23 +0200 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2010-10-21 11:09:46 +1100 |
commit | ab6beb6b7fdffd53b8feb84e008562a2ef33d546 (patch) | |
tree | 02a74f814911ebc3ae6042e8828fb307dd37e854 | |
parent | ef2e8d3c95ef2fed7ead11bea31e3ea0023fc23a (diff) | |
download | samba-ab6beb6b7fdffd53b8feb84e008562a2ef33d546.tar.gz samba-ab6beb6b7fdffd53b8feb84e008562a2ef33d546.tar.xz samba-ab6beb6b7fdffd53b8feb84e008562a2ef33d546.zip |
events.d/11.routing: handle "updateip" event
metze
(This used to be ctdb commit 034635418c7e5274d6bdf4cccc7a10e3b631e2d4)
-rwxr-xr-x | ctdb/config/events.d/11.routing | 11 |
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 "$@" ;; |