summaryrefslogtreecommitdiff
path: root/templates/firewall/broadcast-ping
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@sydney.vyatta.com>2007-12-19 10:52:27 -0800
committerBob Gilligan <gilligan@sydney.vyatta.com>2007-12-19 10:52:27 -0800
commit3300c6c8adcf73277107011b859bfb5c3866cb12 (patch)
tree2a3634f4415faa9785c646afafe9f65df526cb6e /templates/firewall/broadcast-ping
parente9d379a3129cc655453dc4b8abe55abe0ef60522 (diff)
downloadvyatta-cfg-firewall-3300c6c8adcf73277107011b859bfb5c3866cb12.tar.gz
vyatta-cfg-firewall-3300c6c8adcf73277107011b859bfb5c3866cb12.zip
Fix commands so that they work for non-root users.
Diffstat (limited to 'templates/firewall/broadcast-ping')
-rw-r--r--templates/firewall/broadcast-ping/node.def10
1 files changed, 5 insertions, 5 deletions
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\""