diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-07-02 12:14:37 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-07-02 12:14:37 -0700 |
commit | 6d5f6c0383509eed3f28d315fdb5be9cf66342e5 (patch) | |
tree | b3885cbd1b35ef15458c3dfd9cdcb01de75e21e9 /templates/zone-policy/zone/node.def | |
parent | 9b289da08db460061ded374c19bde7296c3f8a5c (diff) | |
download | vyatta-cfg-system-6d5f6c0383509eed3f28d315fdb5be9cf66342e5.tar.gz vyatta-cfg-system-6d5f6c0383509eed3f28d315fdb5be9cf66342e5.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.def | 14 |
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 |