$Lang::tr{'services'} | $Lang::tr{'status'} | PID | $Lang::tr{'memory'} |
"; + print $link{$key}; + print " | \n"; + }else{ + print "|||
"; + print $link{$key}; + print " | \n"; } - } - close(FILE); - undef %cgiparams; -} -if ($cgiparams{'ACTION'} eq $Lang::tr{'reset'}) -{ - undef %cgiparams; -} + my $shortname = $servicenames{$key}; + my $status = &isrunning($shortname); -if ($cgiparams{'ACTION'} eq '') -{ - $cgiparams{'KEY'} = ''; - $cgiparams{'PORTS'} = ''; - $cgiparams{'PROTOCOL'} = '6'; - $cgiparams{'NAME'} = ''; - $cgiparams{'PORT_INVERT'} = 'off'; - $cgiparams{'PROTOCOL_INVERT'} = 'off'; - $cgiparams{'ICMP'} = 'BLANK'; -} - -# Darren Critchley - Bring in the protocols file built from /etc/protocols into hash %protocol -require "${General::swroot}/firewall/protocols.pl"; + print "$status\n"; + print "
$Lang::tr{'servicename'} | -$Lang::tr{'invert'} | -$Lang::tr{'ports'} | -$Lang::tr{'invert'} | -$Lang::tr{'protocol'} | -- | - |
- - | -- - | -- - | -- - | -- | -||
- | - | - | $Lang::tr{'icmp type'}: | -- | -||
\n"; - print "\n"; - print " | \n"; -} else { - print " | \n"; - print " | \n"; -} -print < |
Addon | +Boot | +$Lang::tr{'action'} | +$Lang::tr{'status'} | +PID | +$Lang::tr{'memory'} | +$Lang::tr{'servicename'} | \n"; -} else { - print "$Lang::tr{'servicename'} | \n"; -} -if ($sort_dir eq 'asc' && $sort_col eq '3') { - print "$Lang::tr{'ports'} | \n"; -} else { - print "$Lang::tr{'ports'} | \n"; -} -if ($sort_dir eq 'asc' && $sort_col eq '4') { - print "$Lang::tr{'protocol'} | \n"; -} else { - print "$Lang::tr{'protocol'} | \n"; -} - -print <- | - -END -; -&display_custom_services(); -print < |
$Lang::tr{'servicename'} | -$Lang::tr{'ports'} | -$Lang::tr{'protocol'} | -
$_ | "; + my $status = isautorun($_); + print "$status "; + print ""; + print " | "; + my $status = &isrunningaddon($_); + $status =~ s/\\[[0-1]\;[0-9]+m//g; + + chomp($status); + print "$status"; + print " | $temp[1] | \n"; - if ($temp[4] eq 'on'){$port_inv = " ! (";$port_inv_tail = ")";}else{$port_inv='';$port_inv_tail='';} - print "" . $port_inv . &cleanport("$temp[2]") . $port_inv_tail . " | \n"; - if ($temp[5] eq 'on'){$prot_inv = " ! (";$prot_inv_tail = ")";}else{$prot_inv='';$prot_inv_tail='';} - print "" . $prot_inv . &cleanprotocol("$temp[3]") . $prot_inv_tail . " | \n"; - if ($temp[6] eq 'BLANK') { - print "N/A | \n"; - } else { - print "$temp[6] | \n"; - } - print <- - - - | - - -END -; - print "\n"; - $id++; } } -} -sub display_default_services -{ - my $fname = "${General::swroot}/firewall/defaultservices"; - my $prev = ""; - my $newline=""; - - open(FILE, "$fname") or die 'Unable to open default services file.'; - my @current =
$temp[0] | \n"; - print "$temp[1] | \n"; - print "" . &cleanprotocol("$temp[2]") . " | \n"; - print "