From 3300c6c8adcf73277107011b859bfb5c3866cb12 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Wed, 19 Dec 2007 10:52:27 -0800 Subject: Fix commands so that they work for non-root users. --- templates/firewall/broadcast-ping/node.def | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'templates/firewall/broadcast-ping/node.def') diff --git a/templates/firewall/broadcast-ping/node.def b/templates/firewall/broadcast-ping/node.def index f49831c..5b2dbd5 100644 --- a/templates/firewall/broadcast-ping/node.def +++ b/templates/firewall/broadcast-ping/node.def @@ -3,9 +3,9 @@ help: "ignore all ICMP ECHO and TIMESTAMP requests sent via broadcast/multicast" default: "disable" syntax: $(@) in "enable", "disable"; "broadcast-ping must be enable or disable" create: "if [ x$(@) == xenable ]; \ - then echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts; \ - else echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts; fi" + then sudo sh -c \"echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts\"; \ + else sudo sh -c \"echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts\"; fi" update: "if [ x$(@) == xenable ]; \ - then echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts; \ - else echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts; fi" -delete: "echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts" + then sudo sh -c \"echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts\"; \ + else sudo sh -c \"echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts\"; fi" +delete: "sudo sh -c \"echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts\"" -- cgit v1.2.3