--- loncom/init.d/loncontrol 2009/02/02 17:06:55 1.34 +++ loncom/init.d/loncontrol 2010/01/13 19:26:54 1.34.2.1 @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# $Id: loncontrol,v 1.34 2009/02/02 17:06:55 raeburn Exp $ +# $Id: loncontrol,v 1.34.2.1 2010/01/13 19:26:54 raeburn Exp $ # # The LearningOnline Network with CAPA # @@ -67,11 +67,20 @@ $ENV{'BASH_ENV'}=""; } } my $suse_config = "/etc/sysconfig/SuSEfirewall2"; - if (!-e $suse_config) { + if (-e $suse_config) { + $fw_chain = 'input_ext'; + } else { if (!-e '/etc/sysconfig/iptables') { print("Unable to find iptables file containing static definitions\n"); } } + if (-e $iptables) { + my $count = `$iptables -L -n 2>/dev/null |grep $fw_chain |wc -l`; + chomp($count); + if (!$count) { + $fw_chain ='INPUT'; + } + } my $lond_port = &get_lond_port(); if (!$lond_port) { print("Unable to determine lond port number from LON-CAPA configuration.\n");