we must also try to set the routes when we release an ip since during the release...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 31 Mar 2009 00:33:28 +0000 (11:33 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 31 Mar 2009 00:33:28 +0000 (11:33 +1100)
config/events.d/99.routing

index ec0a7bf29c3267f849f363d30ad04e57483d894e..06741939e53c832b320c81f916c9c8144f12f9ea 100755 (executable)
@@ -24,10 +24,10 @@ shift
 PATH=/usr/bin:/bin:/usr/sbin:/sbin:$PATH
 
 case $cmd in 
-     takeip)
+     takeip|releaseip)
        iface=$1
        cat $CTDB_BASE/static-routes | egrep "^$iface " | while read IFACE DEST GW; do
-               route add -net $DEST gw $GW
+           ip route add $DEST via $GW dev $IFACE >/dev/null 2>/dev/null
        done
 
        ;;