summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-03-07 13:55:47 +1100
committerAmitay Isaacs <amitay@samba.org>2014-03-26 04:21:42 +0100
commite22a22b1f72f75507941b5652bb9a0a2f42dd22f (patch)
tree61824672dce6197045434f937a9de2c17acc1ec2 /ctdb
parent3c839c60d15f11c538709c3e6b85d888131d6e30 (diff)
downloadsamba-e22a22b1f72f75507941b5652bb9a0a2f42dd22f.tar.gz
samba-e22a22b1f72f75507941b5652bb9a0a2f42dd22f.tar.xz
samba-e22a22b1f72f75507941b5652bb9a0a2f42dd22f.zip
ctdb-eventscripts: Reformat natgw_clear()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/config/events.d/11.natgw20
1 files changed, 11 insertions, 9 deletions
diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw
index 852f8f2e29c..ae093058564 100755
--- a/ctdb/config/events.d/11.natgw
+++ b/ctdb/config/events.d/11.natgw
@@ -38,18 +38,20 @@ natgw_set_capability ()
natgw_clear ()
{
- _ip="${CTDB_NATGW_PUBLIC_IP%/*}"
- _maskbits="${CTDB_NATGW_PUBLIC_IP#*/}"
+ _ip="${CTDB_NATGW_PUBLIC_IP%/*}"
+ _maskbits="${CTDB_NATGW_PUBLIC_IP#*/}"
- delete_ip_from_iface $CTDB_NATGW_PUBLIC_IFACE $_ip $_maskbits >/dev/null 2>&1
- ip route del 0.0.0.0/0 metric 10 >/dev/null 2>/dev/null
+ delete_ip_from_iface \
+ $CTDB_NATGW_PUBLIC_IFACE $_ip $_maskbits >/dev/null 2>&1
+ ip route del 0.0.0.0/0 metric 10 >/dev/null 2>/dev/null
- # Delete the masquerading setup from a previous iteration where we
- # were the NAT-GW
- iptables -D POSTROUTING -t nat -s $CTDB_NATGW_PRIVATE_NETWORK ! -d $CTDB_NATGW_PRIVATE_NETWORK -j MASQUERADE >/dev/null 2>/dev/null
+ # Delete the masquerading setup from a previous iteration where we
+ # were the NAT-GW
+ iptables -D POSTROUTING -t nat \
+ -s $CTDB_NATGW_PRIVATE_NETWORK ! -d $CTDB_NATGW_PRIVATE_NETWORK \
+ -j MASQUERADE >/dev/null 2>/dev/null
- # remove any iptables rule we may have on this address
- iptables -D INPUT -p tcp --syn -d $_ip/32 -j REJECT 2>/dev/null
+ iptables -D INPUT -p tcp --syn -d $_ip/32 -j REJECT 2>/dev/null
}
natgw_set_master ()