summaryrefslogtreecommitdiff
path: root/templates/zone-policy/zone/node.def
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2009-07-02 12:14:37 -0700
committerMohit Mehta <mohit.mehta@vyatta.com>2009-07-02 12:22:27 -0700
commitd9c64f2c8e4daaec06ae63235563191d1e03c966 (patch)
treecab00218d2910ae991e7eeb31a5dd7515a13d897 /templates/zone-policy/zone/node.def
parent85f6cdd06a22a20757c3c144716b0f67f20dc6c5 (diff)
downloadvyatta-cfg-quagga-d9c64f2c8e4daaec06ae63235563191d1e03c966.tar.gz
vyatta-cfg-quagga-d9c64f2c8e4daaec06ae63235563191d1e03c966.zip
Fix Bug 4554 check for existing firewall ruleset fails when applying it to a zone during boot
* use isActive to check if firewall ruleset has been succesfully committed * fix templates to fail inside an action field when a command fails
Diffstat (limited to 'templates/zone-policy/zone/node.def')
-rw-r--r--templates/zone-policy/zone/node.def14
1 files changed, 10 insertions, 4 deletions
diff --git a/templates/zone-policy/zone/node.def b/templates/zone-policy/zone/node.def
index 1f8f2ffd..80e4f4e2 100644
--- a/templates/zone-policy/zone/node.def
+++ b/templates/zone-policy/zone/node.def
@@ -12,10 +12,16 @@ syntax:expression: pattern $VAR(@) "^[^-]" ; "Zone name cannot start with \"-\""
syntax:expression: pattern $VAR(@) "^[^;]*$" ; "Zone name cannot contain ';'"
-create: /opt/vyatta/sbin/vyatta-zone.pl \
+create:
+ if ! /opt/vyatta/sbin/vyatta-zone.pl \
--action=add-zone \
- --zone-name="$VAR(@)"
+ --zone-name="$VAR(@)"; then
+ exit 1
+ fi
-delete: /opt/vyatta/sbin/vyatta-zone.pl \
+delete:
+ if ! /opt/vyatta/sbin/vyatta-zone.pl \
--action=delete-zone \
- --zone-name="$VAR(@)"
+ --zone-name="$VAR(@)"; then
+ exit 1
+ fi