2 # script to add entries to the routing table after we have performed a
4 # (when we do a "releaseip" event and remove an ip address from an interface
5 # the kernel might automatically remove associated entries from
6 # the routing table. This is where we add them back)
8 # Routes to add are defined in /etc/ctdb/static-routes.
10 # IFACE NET/MASK GATEWAY
13 # bond1 10.3.3.0/24 10.0.0.1
15 . $CTDB_BASE/functions
18 [ -f $CTDB_BASE/static-routes ] || {
24 PATH=/usr/bin:/bin:/usr/sbin:/sbin:$PATH
29 cat $CTDB_BASE/static-routes | egrep "^$iface " | while read IFACE DEST GW; do
30 ip route add $DEST via $GW dev $IFACE >/dev/null 2>/dev/null