diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-07-02 12:13:54 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-07-02 12:13:54 -0700 |
commit | e104222473dc316a998b5ea9fff56f3bd13143a2 (patch) | |
tree | b914c778b234ccd99b62b18c5cb3f039f704ef1f | |
parent | 56c4c6ffe27926d423dd29c7d8cca99e97ab0f05 (diff) | |
download | vyatta-cfg-e104222473dc316a998b5ea9fff56f3bd13143a2.tar.gz vyatta-cfg-e104222473dc316a998b5ea9fff56f3bd13143a2.zip |
add function to check if a firewall ruleset isActive
-rwxr-xr-x | lib/Vyatta/Zone.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Vyatta/Zone.pm b/lib/Vyatta/Zone.pm index fd224b0..4b169b5 100755 --- a/lib/Vyatta/Zone.pm +++ b/lib/Vyatta/Zone.pm @@ -49,6 +49,12 @@ sub run_cmd { return $error; } +sub is_fwruleset_active { + my ($value_func, $ruleset_type, $fw_ruleset) = @_; + my $config = new Vyatta::Config; + return $config->$value_func("firewall $ruleset_type $fw_ruleset"); +} + sub get_all_zones { my $value_func = shift; my $config = new Vyatta::Config; |