summaryrefslogtreecommitdiffstats
path: root/ctdb/config
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2009-05-14 08:12:48 +1000
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-05-14 08:12:48 +1000
commit016b37f1e22cadae98114856a15edf0388271692 (patch)
treedaa5b22c0c513803d66b5b62f824846fc602b580 /ctdb/config
parent60bfafbf10a1d12bc491ec4e07b5af1e1eccb74e (diff)
downloadsamba-016b37f1e22cadae98114856a15edf0388271692.tar.gz
samba-016b37f1e22cadae98114856a15edf0388271692.tar.xz
samba-016b37f1e22cadae98114856a15edf0388271692.zip
change the prefix NATGW_ to CTDB_NATGW_
(This used to be ctdb commit b7ed7fd4a5fbd344d41caa1afa100b1f24506173)
Diffstat (limited to 'ctdb/config')
-rw-r--r--ctdb/config/ctdb.sysconfig12
-rw-r--r--ctdb/config/events.d/11.natgw18
2 files changed, 15 insertions, 15 deletions
diff --git a/ctdb/config/ctdb.sysconfig b/ctdb/config/ctdb.sysconfig
index 340ac75d4c8..758e89148e4 100644
--- a/ctdb/config/ctdb.sysconfig
+++ b/ctdb/config/ctdb.sysconfig
@@ -175,15 +175,15 @@
# and thus no proper routes to the external world it will instead
# route all packets through the nat-gw node.
#
-# NATGW_NODES is the list of nodes that belong to this natgw group.
+# CTDB_NATGW_NODES is the list of nodes that belong to this natgw group.
# You can have multiple natgw groups in one cluster but each node
# can only belong to one single natgw group.
#
-# NATGW_PUBLIC_IP=10.0.0.227/24
-# NATGW_PUBLIC_IFACE=eth0
-# NATGW_DEFAULT_GATEWAY=10.0.0.1
-# NATGW_PRIVATE_NETWORK=10.1.1.0/24
-# NATGW_NODES=/etc/ctdb/natgw_nodes
+# CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
+# CTDB_NATGW_PUBLIC_IFACE=eth0
+# CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
+# CTDB_NATGW_PRIVATE_NETWORK=10.1.1.0/24
+# CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
# where to log messages
# the default is /var/log/log.ctdb
diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw
index 0fee6ff4a3b..3da60d898bb 100644
--- a/ctdb/config/events.d/11.natgw
+++ b/ctdb/config/events.d/11.natgw
@@ -8,7 +8,7 @@
. $CTDB_BASE/functions
loadconfig ctdb
-[ -z "$NATGW_PUBLIC_IFACE" ] && exit 0
+[ -z "$CTDB_NATGW_PUBLIC_IFACE" ] && exit 0
cmd="$1"
shift
@@ -16,14 +16,14 @@ PATH=/usr/bin:/bin:/usr/sbin:/sbin:$PATH
delete_all() {
- remove_ip $NATGW_PUBLIC_IP $NATGW_PUBLIC_IFACE
- remove_ip $NATGW_PUBLIC_IP_HOST lo
+ remove_ip $CTDB_NATGW_PUBLIC_IP $CTDB_NATGW_PUBLIC_IFACE
+ remove_ip $CTDB_NATGW_PUBLIC_IP_HOST lo
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 $NATGW_PRIVATE_NETWORK -d ! $NATGW_PRIVATE_NETWORK -j MASQUERADE >/dev/null 2>/dev/null
+ iptables -D POSTROUTING -t nat -s $CTDB_NATGW_PRIVATE_NETWORK -d ! $CTDB_NATGW_PRIVATE_NETWORK -j MASQUERADE >/dev/null 2>/dev/null
}
@@ -33,16 +33,16 @@ case $cmd in
NATGWMASTER=`ctdb natgwlist | head -1`
NATGWIP=`ctdb natgwlist | tail --lines=+2 | head -1 | cut -d: -f3`
- NATGW_PUBLIC_IP_HOST=`echo $NATGW_PUBLIC_IP | sed -e "s/\/.*/\/32/"`
+ CTDB_NATGW_PUBLIC_IP_HOST=`echo $CTDB_NATGW_PUBLIC_IP | sed -e "s/\/.*/\/32/"`
delete_all
if [ "$MYPNN" == "$NATGWMASTER" ]; then
# This is the first node, set it up as the NAT GW
echo 1 >/proc/sys/net/ipv4/ip_forward
- iptables -A POSTROUTING -t nat -s $NATGW_PRIVATE_NETWORK -d ! $NATGW_PRIVATE_NETWORK -j MASQUERADE
- ip addr add $NATGW_PUBLIC_IP dev $NATGW_PUBLIC_IFACE
- ip route add 0.0.0.0/0 via $NATGW_DEFAULT_GATEWAY >/dev/null 2>/dev/null
+ iptables -A POSTROUTING -t nat -s $CTDB_NATGW_PRIVATE_NETWORK -d ! $CTDB_NATGW_PRIVATE_NETWORK -j MASQUERADE
+ ip addr add $CTDB_NATGW_PUBLIC_IP dev $CTDB_NATGW_PUBLIC_IFACE
+ ip route add 0.0.0.0/0 via $CTDB_NATGW_DEFAULT_GATEWAY >/dev/null 2>/dev/null
else
# This is not the NAT-GW
# Assign the public ip to the private interface and make
@@ -50,7 +50,7 @@ case $cmd in
# We do this so that the ip address will exist on a
# non-loopback interface so that samba may send it along in the
# KDC requests.
- ip addr add $NATGW_PUBLIC_IP_HOST dev lo
+ ip addr add $CTDB_NATGW_PUBLIC_IP_HOST dev lo
ip route add 0.0.0.0/0 via $NATGWIP metric 10
fi