summaryrefslogtreecommitdiff
path: root/templates-cfg/zone-policy/zone/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates-cfg/zone-policy/zone/node.def')
-rw-r--r--templates-cfg/zone-policy/zone/node.def24
1 files changed, 24 insertions, 0 deletions
diff --git a/templates-cfg/zone-policy/zone/node.def b/templates-cfg/zone-policy/zone/node.def
new file mode 100644
index 0000000..eb8c3c8
--- /dev/null
+++ b/templates-cfg/zone-policy/zone/node.def
@@ -0,0 +1,24 @@
+tag:
+type: txt
+help: Zone name
+
+syntax:expression: pattern $VAR(@) "^[[:print:]]{1,20}$" ;
+ "Zone name must be 20 characters or less"
+
+syntax:expression: pattern $VAR(@) "^[^-]" ; "Zone name cannot start with \"-\""
+
+syntax:expression: pattern $VAR(@) "^[^;]*$" ; "Zone name cannot contain ';'"
+
+create:
+ if ! /opt/vyatta/sbin/vyatta-zone.pl \
+ --action=add-zone \
+ --zone-name="$VAR(@)"; then
+ exit 1
+ fi
+
+delete:
+ if ! /opt/vyatta/sbin/vyatta-zone.pl \
+ --action=delete-zone \
+ --zone-name="$VAR(@)"; then
+ exit 1
+ fi