diff options
author | Martin Schwenke <martin@meltin.net> | 2012-03-20 16:20:10 +1100 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2012-03-22 15:30:27 +1100 |
commit | 020c8190c5cfccea4c9f07f95ee6f0571e8a76e6 (patch) | |
tree | 540528b51fac33eee8a952f65c63006fe6dc7d36 | |
parent | 4f65737809a4493537d3a27b04f4ae049b493007 (diff) | |
download | samba-020c8190c5cfccea4c9f07f95ee6f0571e8a76e6.tar.gz samba-020c8190c5cfccea4c9f07f95ee6f0571e8a76e6.tar.xz samba-020c8190c5cfccea4c9f07f95ee6f0571e8a76e6.zip |
Eventscripts - use set_proc() rather than accessing /proc directly
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bdb4cdaf2aed79c8de6a8db8c01685b242808310)
-rwxr-xr-x | ctdb/config/events.d/13.per_ip_routing | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ctdb/config/events.d/13.per_ip_routing b/ctdb/config/events.d/13.per_ip_routing index 24a8162c92..311827ff9a 100755 --- a/ctdb/config/events.d/13.per_ip_routing +++ b/ctdb/config/events.d/13.per_ip_routing @@ -286,8 +286,8 @@ case "$1" in # make sure that we only respond to ARP messages from the NIC # where a particular ip address is associated. - [ -f /proc/sys/net/ipv4/conf/all/arp_filter ] && { - echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter + get_proc sys/net/ipv4/conf/all/arp_filter >/dev/null 2>&1 && { + set_proc sys/net/ipv4/conf/all/arp_filter 1 } ;; @@ -305,7 +305,7 @@ case "$1" in add_routing_for_ip "$iface" "$ip" # flush our route cache - echo 1 > /proc/sys/net/ipv4/route/flush + set_proc sys/net/ipv4/route/flush 1 ctdb gratiousarp "$ip" "$iface" ;; @@ -320,7 +320,7 @@ case "$1" in add_routing_for_ip "$niface" "$ip" # flush our route cache - echo 1 > /proc/sys/net/ipv4/route/flush + set_proc sys/net/ipv4/route/flush 1 ctdb gratiousarp "$ip" "$niface" tickle_tcp_connections "$ip" |