Diff for /loncom/configuration/Firewall.pm between versions 1.2 and 1.4

version 1.2, 2009/06/11 13:01:56 version 1.4, 2009/07/06 00:07:19
Line 294  sub get_lond_port { Line 294  sub get_lond_port {
 }  }
   
 sub get_fw_chain {  sub get_fw_chain {
       my ($iptables) = @_;
     my $fw_chain = 'RH-Firewall-1-INPUT';      my $fw_chain = 'RH-Firewall-1-INPUT';
     my $suse_config = "/etc/sysconfig/SuSEfirewall2";      my $suse_config = "/etc/sysconfig/SuSEfirewall2";
     if (-e $suse_config) {      if (-e $suse_config) {
Line 302  sub get_fw_chain { Line 303  sub get_fw_chain {
         if (!-e '/etc/sysconfig/iptables') {          if (!-e '/etc/sysconfig/iptables') {
             print("Unable to find iptables file containing static definitions\n");              print("Unable to find iptables file containing static definitions\n");
         }          }
           if ($iptables eq '') {
               $iptables = &get_pathto_iptables();
           }
           my $count = `$iptables -L -n 2>/dev/null |grep $fw_chain |wc -l`;
           chomp($count);
           if (!$count) {
               $fw_chain ='INPUT';
           }
     }      }
     return $fw_chain;      return $fw_chain;
 }  }

Removed from v.1.2  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>