git.samba.org
/
metze
/
ctdb
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3695462
)
events.d/11.routing: handle "updateip" event
author
Stefan Metzmacher
<metze@samba.org>
Tue, 19 Oct 2010 17:21:23 +0000
(19:21 +0200)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Thu, 21 Oct 2010 00:09:46 +0000
(11:09 +1100)
metze
config/events.d/11.routing
patch
|
blob
|
history
diff --git
a/config/events.d/11.routing
b/config/events.d/11.routing
index c265c382d0c60008ab7043ed57dd3ce728a5ea74..9a1fdef788d9279dd237c7a8e2e2a9f706cb69dc 100755
(executable)
--- a/
config/events.d/11.routing
+++ b/
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 "$@"
;;