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:22:27 -0700 |
commit | d9c64f2c8e4daaec06ae63235563191d1e03c966 (patch) | |
tree | cab00218d2910ae991e7eeb31a5dd7515a13d897 /scripts/zone-mgmt | |
parent | 85f6cdd06a22a20757c3c144716b0f67f20dc6c5 (diff) | |
download | vyatta-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 'scripts/zone-mgmt')
-rwxr-xr-x | scripts/zone-mgmt/vyatta-zone.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/zone-mgmt/vyatta-zone.pl b/scripts/zone-mgmt/vyatta-zone.pl index 7d2206cb..8760b6a6 100755 --- a/scripts/zone-mgmt/vyatta-zone.pl +++ b/scripts/zone-mgmt/vyatta-zone.pl @@ -689,6 +689,14 @@ sub check_zones_validity { return; } +sub check_fwruleset_isActive { + my ($ruleset_type, $ruleset_name) = @_; + my $error = Vyatta::Zone::is_fwruleset_active('isActive', + $ruleset_type, $ruleset_name); + return "Invalid firewall ruleset $ruleset_type $ruleset_name" if $error; + return; +} + # # main # @@ -739,6 +747,9 @@ my ($error, $warning); ($error, $warning) = set_default_policy($zone_name, $default_policy) if $action eq 'set-default-policy'; +($error, $warning) = check_fwruleset_isActive($ruleset_type, $ruleset_name) + if $action eq 'is-fwruleset-active'; + if (defined $warning) { print "$warning\n"; } |