diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-03-31 11:33:28 +1100 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-03-31 11:33:28 +1100 |
commit | b9e6e15cd47455ffc96ecc96b708b0e79772fadb (patch) | |
tree | 2dc8140ff77f8e4577b98b6a319fe86cec7862dd /ctdb | |
parent | 4c1acd84723122538251c97ce0727d592dd594a7 (diff) | |
download | samba-b9e6e15cd47455ffc96ecc96b708b0e79772fadb.tar.gz samba-b9e6e15cd47455ffc96ecc96b708b0e79772fadb.tar.xz samba-b9e6e15cd47455ffc96ecc96b708b0e79772fadb.zip |
we must also try to set the routes when we release an ip since during the release/10.interfaces there can actually be a window where the kernel decides to remove all addresses (before we manually add them back in 10.interfaces) during which the kernel may also decide to delete all routes since there are no gateways reachable through this interface anymore.
(This used to be ctdb commit 34633223a46caaa079da233663f9c6dcc1803f87)
Diffstat (limited to 'ctdb')
-rwxr-xr-x | ctdb/config/events.d/99.routing | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/config/events.d/99.routing b/ctdb/config/events.d/99.routing index ec0a7bf29c3..06741939e53 100755 --- a/ctdb/config/events.d/99.routing +++ b/ctdb/config/events.d/99.routing @@ -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 ;; |