diff options
author | Mohit Mehta <mohit@vyatta.com> | 2010-09-21 21:13:06 -0700 |
---|---|---|
committer | Mohit Mehta <mohit@vyatta.com> | 2010-09-21 21:13:06 -0700 |
commit | 847b97e90a0ba2e5bd103a0d018592b05879d1c7 (patch) | |
tree | b9f6799c3e864d1bca7141115b04dcd60276abb0 | |
parent | 090c69d07b8f8225826134d30f42ffe636c156ed (diff) | |
download | vyatta-cfg-847b97e90a0ba2e5bd103a0d018592b05879d1c7.tar.gz vyatta-cfg-847b97e90a0ba2e5bd103a0d018592b05879d1c7.zip |
* move count_iptables_rules to Iptables::Mgr module
-rwxr-xr-x | lib/Vyatta/Misc.pm | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm index b774f72..5373f7f 100755 --- a/lib/Vyatta/Misc.pm +++ b/lib/Vyatta/Misc.pm @@ -26,8 +26,7 @@ require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(getInterfaces getIP getNetAddIP get_sysfs_value is_address_enabled is_dhcp_enabled - isIpAddress is_ip_v4_or_v6 interface_description - count_iptables_rules); + isIpAddress is_ip_v4_or_v6 interface_description); our @EXPORT_OK = qw(generate_dhclient_intf_files getInterfacesIPadresses getPortRuleString); @@ -418,14 +417,4 @@ sub interface_description { return $description; } -sub count_iptables_rules { - my ($command, $table, $chain) = @_; - my @lines = `sudo $command -t $table -L $chain -n --line`; - my $cnt = 0; - foreach my $line (@lines) { - $cnt++ if $line =~ /^\d/; - } - return $cnt; -} - 1; |