diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-10-07 18:07:16 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-10-07 18:07:16 -0700 |
commit | 1f7bba17f9d53aad7810718ea26d8bbad405b309 (patch) | |
tree | 5b3cef11c97d0bf39e51da049c1f8a21bdbe1cfc /templates-cfg/zone-policy/zone/node.def | |
download | vyatta-zone-debian/0.1.tar.gz vyatta-zone-debian/0.1.zip |
Initial releasedebian/0.1
Diffstat (limited to 'templates-cfg/zone-policy/zone/node.def')
-rw-r--r-- | templates-cfg/zone-policy/zone/node.def | 24 |
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 |