diff options
author | Martin Schwenke <martin@meltin.net> | 2014-03-07 13:37:21 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-03-26 04:21:41 +0100 |
commit | feeb9843bf46d00beb10f3e959ba0f73f5e33e8c (patch) | |
tree | 46ffac76bc00cfe4ad3b2ae2da2a8b29bc8cbddf | |
parent | 233e3c96318db8111d8a7f5f649265cc9ecb5b27 (diff) | |
download | samba-feeb9843bf46d00beb10f3e959ba0f73f5e33e8c.tar.gz samba-feeb9843bf46d00beb10f3e959ba0f73f5e33e8c.tar.xz samba-feeb9843bf46d00beb10f3e959ba0f73f5e33e8c.zip |
ctdb-eventscripts: Use set_proc() to update /proc
In case we want to write some unit tests in the future.
Signed-off-by: Martin Schwenke <martin@meltin.net>
-rwxr-xr-x | ctdb/config/events.d/11.natgw | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw index 855500500b..7424fd2e18 100755 --- a/ctdb/config/events.d/11.natgw +++ b/ctdb/config/events.d/11.natgw @@ -66,7 +66,7 @@ case "$1" in die "ERROR: NATGW configured to use a public address. NATGW must not use a public address." # do not send out arp requests from loopback addresses - echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce + set_proc sys/net/ipv4/conf/all/arp_announce 2 ;; updatenatgw|ipreallocated) @@ -79,7 +79,7 @@ case "$1" in if [ "$mypnn" = "$natgwmaster" ]; then # This is the NAT GW - echo 1 >/proc/sys/net/ipv4/ip_forward + set_proc sys/net/ipv4/ip_forward 1 iptables -A POSTROUTING -t nat -s $CTDB_NATGW_PRIVATE_NETWORK ! -d $CTDB_NATGW_PRIVATE_NETWORK -j MASQUERADE # block all incoming connections to the natgw address @@ -98,7 +98,7 @@ case "$1" in fi # flush our route cache - echo 1 > /proc/sys/net/ipv4/route/flush + set_proc sys/net/ipv4/route/flush 1 ;; shutdown|removenatgw) |