diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-02-12 10:33:54 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-02-23 10:38:48 +0100 |
commit | 90769bf4eb507db5672eac4dcb9463d55ecc5ba0 (patch) | |
tree | a70a65a5c29e1ecc170d98d7d0ac4dbf23ec0662 /ctdb/config/events.d | |
parent | d71c40cad76b432b87b4d2671f5c800ed26a045e (diff) | |
download | samba-90769bf4eb507db5672eac4dcb9463d55ecc5ba0.tar.gz samba-90769bf4eb507db5672eac4dcb9463d55ecc5ba0.tar.xz samba-90769bf4eb507db5672eac4dcb9463d55ecc5ba0.zip |
config/11.natgw: use delete_ip_from_iface() instead of remove_ip()
This also initializes the variables correctly for the
shutdown|removenatgw code path to delete_all.
metze
(This used to be ctdb commit 2c2cbed4fcbc868a990fa6b32fc96126ffc61bb5)
Diffstat (limited to 'ctdb/config/events.d')
-rw-r--r-- | ctdb/config/events.d/11.natgw | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw index ce1becc072..18db3dee99 100644 --- a/ctdb/config/events.d/11.natgw +++ b/ctdb/config/events.d/11.natgw @@ -11,8 +11,11 @@ loadconfig [ -z "$CTDB_NATGW_PUBLIC_IFACE" ] && exit 0 delete_all() { - remove_ip $CTDB_NATGW_PUBLIC_IP $CTDB_NATGW_PUBLIC_IFACE - remove_ip $CTDB_NATGW_PUBLIC_IP_HOST lo + local _ip=`echo $CTDB_NATGW_PUBLIC_IP | cut -d '/' -f1` + local _maskbits=`echo $CTDB_NATGW_PUBLIC_IP | cut -d '/' -f2` + + delete_ip_from_iface $CTDB_NATGW_PUBLIC_IFACE $_ip $_maskbits + delete_ip_from_iface lo $_ip 32 ip route del 0.0.0.0/0 metric 10 >/dev/null 2>/dev/null |