From feeb9843bf46d00beb10f3e959ba0f73f5e33e8c Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 7 Mar 2014 13:37:21 +1100 Subject: [PATCH] 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 --- ctdb/config/events.d/11.natgw | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw index 855500500bb..7424fd2e18e 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) -- 2.11.4.GIT