summaryrefslogtreecommitdiff
path: root/templates/firewall/ipv6-name
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-10-02 18:17:55 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-10-02 18:17:55 -0700
commiteead90d563cc74caf577975ce6e84b27f5d83f08 (patch)
tree05ee617e08c310fc770c90e3e6257eeda449bc4c /templates/firewall/ipv6-name
parentbf06ade19bd6a6945c0a8f2ae12c1114c7cd1b18 (diff)
downloadvyatta-cfg-firewall-eead90d563cc74caf577975ce6e84b27f5d83f08.tar.gz
vyatta-cfg-firewall-eead90d563cc74caf577975ce6e84b27f5d83f08.zip
Change syntax exec to syntax pattern.
Diffstat (limited to 'templates/firewall/ipv6-name')
-rw-r--r--templates/firewall/ipv6-name/node.def23
1 files changed, 8 insertions, 15 deletions
diff --git a/templates/firewall/ipv6-name/node.def b/templates/firewall/ipv6-name/node.def
index 0d3fb79..c794dc3 100644
--- a/templates/firewall/ipv6-name/node.def
+++ b/templates/firewall/ipv6-name/node.def
@@ -2,21 +2,14 @@ tag:
type: txt
-syntax:expression: exec " \
- if [ `echo -n '$VAR(@)' | wc -c` -gt 29 ]; then \
- echo firewall ipv6-name must be 29 characters or less; \
- exit 1 ; \
- fi ; "
-
-syntax:expression: pattern $VAR(@) "^[^-]" ; "Firewall rule set name cannot start with \"-\""
-
-syntax:expression: pattern $VAR(@) "^[^;]*$" ; "Firewall rule set name cannot contain ';'"
-
-syntax:expression: exec "
- if echo '$VAR(@)' | grep -q '^VZONE'; then
- echo Firewall rule set name cannot start with 'VZONE'
- exit 1
- fi "
+syntax:expression: pattern $VAR(@) "^[[:print:]]{1,29}$" ; \
+ "Firewall name must be 29 characters or less"
+syntax:expression: pattern $VAR(@) "^[^-]" ; \
+ "Firewall rule set name cannot start with \"-\""
+syntax:expression: pattern $VAR(@) "^[^;]*$" ; \
+ "Firewall rule set name cannot contain ';'"
+syntax:expression: ! pattern $VAR(@) "^VZONE" ; \
+ "Firewall rule set name cannot start with 'VZONE'"
end: if sudo /opt/vyatta/sbin/vyatta-firewall.pl --update-rules ipv6-name "$VAR(@)" ;
then