diff options
author | Bob Gilligan <gilligan@sydney.vyatta.com> | 2007-12-19 10:52:27 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@sydney.vyatta.com> | 2007-12-19 10:52:27 -0800 |
commit | 3300c6c8adcf73277107011b859bfb5c3866cb12 (patch) | |
tree | 2a3634f4415faa9785c646afafe9f65df526cb6e /templates/firewall/broadcast-ping | |
parent | e9d379a3129cc655453dc4b8abe55abe0ef60522 (diff) | |
download | vyatta-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.def | 10 |
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\"" |