mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Imported graphs.pl and hardwaregraphs.cgi (by maniac)
Removed ipac-ng & mbmon
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -50,12 +50,6 @@ LoadPlugin syslog
|
||||
# File STDOUT
|
||||
#</Plugin>
|
||||
|
||||
#<Plugin mbmon>
|
||||
# Host "127.0.0.1"
|
||||
# Port "411"
|
||||
#</Plugin>
|
||||
|
||||
|
||||
<Plugin ping>
|
||||
Host "gateway"
|
||||
</Plugin>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
bin/mail
|
||||
#etc/ipac-ng
|
||||
etc/ipac-ng/ipac.conf
|
||||
etc/ipac-ng/rules.conf
|
||||
#usr/man/man8/fetchipac.8
|
||||
#usr/man/man8/ipac-convert.8
|
||||
#usr/man/man8/ipacsum.8
|
||||
usr/sbin/fetchipac
|
||||
#usr/sbin/ipac-convert
|
||||
usr/sbin/ipacsum
|
||||
var/log/ip-acct
|
||||
@@ -1,2 +0,0 @@
|
||||
usr/bin/mbmon
|
||||
#usr/man/man1/mbmon.1
|
||||
@@ -1,214 +1,220 @@
|
||||
#!/usr/bin/perl
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
use strict;
|
||||
|
||||
# enable only the following on debugging purpose
|
||||
#use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
require "${General::swroot}/graphs.pl";
|
||||
|
||||
my %mbmonsettings = ();
|
||||
my %cgiparams=();
|
||||
my @cgigraphs=();
|
||||
|
||||
&Header::showhttpheaders();
|
||||
|
||||
my $graphdir = "/srv/web/ipfire/html/graphs";
|
||||
|
||||
$ENV{'QUERY_STRING'} =~ s/&//g;
|
||||
@cgigraphs = split(/graph=/,$ENV{'QUERY_STRING'});
|
||||
$cgigraphs[1] = '' unless defined $cgigraphs[1];
|
||||
|
||||
my @mbmongraphs = ();
|
||||
if ( -e "/var/log/rrd/collectd/localhost/mbmon" ){@mbmongraphs = `ls /var/log/rrd/collectd/localhost/mbmon/`;}
|
||||
|
||||
&Header::getcgihash(\%mbmonsettings);
|
||||
|
||||
if ( $mbmonsettings{'ACTION'} eq $Lang::tr{'save'} ) {
|
||||
foreach (@mbmongraphs){
|
||||
chomp($_);
|
||||
my @name=split(/\./,$_);
|
||||
if ( $mbmonsettings{'LINE-'.$name[0]} ne "on" ){$mbmonsettings{'LINE-'.$name[0]} = 'off';}
|
||||
elsif ( $mbmonsettings{'LINE-'.$name[0]} eq "on" ){$mbmonsettings{'LINE-'.$name[0]} = 'checked';}
|
||||
}
|
||||
&General::writehash("${General::swroot}/mbmon/settings", \%mbmonsettings);
|
||||
}
|
||||
|
||||
my @disks = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`;
|
||||
|
||||
&Header::openpage($Lang::tr{'harddisk temperature graphs'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left');
|
||||
|
||||
if ($cgigraphs[1] =~ /hwtemp/) {&Graphs::updatehwtempgraph ("hour");&Graphs::updatehwtempgraph ("week");&Graphs::updatehwtempgraph ("month");&Graphs::updatehwtempgraph ("year");graphbox("hwtemp");}
|
||||
elsif ($cgigraphs[1] =~ /hwfan/) {&Graphs::updatehwfangraph ("hour");&Graphs::updatehwfangraph ("week");&Graphs::updatehwfangraph ("month");&Graphs::updatehwfangraph ("year");graphbox("hwfan");}
|
||||
elsif ($cgigraphs[1] =~ /hwvolt/) {&Graphs::updatehwvoltgraph ("hour");&Graphs::updatehwvoltgraph ("week");&Graphs::updatehwvoltgraph ("month");&Graphs::updatehwvoltgraph ("year");graphbox("hwvolt");}
|
||||
elsif ($cgigraphs[1] =~ /hddtemp/) {
|
||||
foreach (@disks){
|
||||
my $disk = $_;
|
||||
chomp $disk;
|
||||
my @array = split(/\//,$disk);
|
||||
&Graphs::updatehddgraph ($array[$#array],"week");&Graphs::updatehddgraph ($array[$#array],"month");&Graphs::updatehddgraph ($array[$#array],"year");
|
||||
hddtempbox($array[$#array]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
&Graphs::updatehwtempgraph ("day");&Graphs::updatehwfangraph ("day");&Graphs::updatehwvoltgraph ("day");
|
||||
foreach (@disks){
|
||||
my $disk = $_;
|
||||
chomp $disk;
|
||||
my @array = split(/\//,$disk);
|
||||
&Graphs::updatehddgraph ($array[$#array],"day");
|
||||
if (-e "$graphdir/hddtemp-$disk-day.png") {
|
||||
|
||||
&Header::openbox('100%', 'center', "Disk $disk $Lang::tr{'graph'}");
|
||||
my $ftime = localtime((stat("$graphdir/hddtemp-$disk-day.png"))[9]);
|
||||
print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<a href='/cgi-bin/hardwaregraphs.cgi?graph=hddtemp'>";
|
||||
print "<img src='/graphs/hddtemp-$disk-day.png' border='0' />";
|
||||
print "</a>";
|
||||
print "<br />\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
}
|
||||
|
||||
my @graphs = ("hwtemp","hwfan","hwvolt");
|
||||
foreach (@graphs){
|
||||
&Header::openbox('100%', 'center', "$_ $Lang::tr{'graph'}");
|
||||
if (-e "$graphdir/mbmon-$_-day.png"){
|
||||
my $ftime = localtime((stat("$graphdir/mbmon-$_-day.png"))[9]);
|
||||
print "<center>";
|
||||
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<a href='/cgi-bin/hardwaregraphs.cgi?graph=$_'>";
|
||||
print "<img src='/graphs/mbmon-$_-day.png' border='0' />";
|
||||
print "</a><hr />";
|
||||
}
|
||||
else{print $Lang::tr{'no information available'};}
|
||||
&Header::closebox();
|
||||
}
|
||||
if ( -e "/var/log/rrd/collectd/localhost/mbmon" ){mbmonbox();}
|
||||
}
|
||||
|
||||
&Header::closebigbox();
|
||||
&Header::closepage();
|
||||
|
||||
sub hddtempbox {
|
||||
my $disk = $_[0];
|
||||
if (-e "$graphdir/hddtemp-$disk-week.png") {
|
||||
|
||||
&Header::openbox('100%', 'center', "Disk $disk $Lang::tr{'graph'}");
|
||||
my $ftime = localtime((stat("$graphdir/hddtemp-$disk-week.png"))[9]);
|
||||
print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/hddtemp-$disk-week.png' border='0' />";
|
||||
print "<br />\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
if (-e "$graphdir/hddtemp-$disk-month.png") {
|
||||
|
||||
&Header::openbox('100%', 'center', "Disk $disk $Lang::tr{'graph'}");
|
||||
my $ftime = localtime((stat("$graphdir/hddtemp-$disk-month.png"))[9]);
|
||||
print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/hddtemp-$disk-month.png' border='0' />";
|
||||
print "<br />\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
if (-e "$graphdir/hddtemp-$disk-year.png") {
|
||||
|
||||
&Header::openbox('100%', 'center', "Disk $disk $Lang::tr{'graph'}");
|
||||
my $ftime = localtime((stat("$graphdir/hddtemp-$disk-year.png"))[9]);
|
||||
print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/hddtemp-$disk-year.png' border='0' />";
|
||||
print "<br />\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
}
|
||||
|
||||
sub graphbox {
|
||||
my $graph = $_[0];
|
||||
|
||||
&Header::openbox('100%', 'center', "$graph $Lang::tr{'graph'}");
|
||||
if (-e "$graphdir/mbmon-$graph-week.png"){
|
||||
my $ftime = localtime((stat("$graphdir/mbmon-$graph-week.png"))[9]);
|
||||
print "<center>";
|
||||
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/mbmon-$graph-week.png' border='0' /><hr />";
|
||||
}
|
||||
else{print $Lang::tr{'no information available'};}
|
||||
&Header::closebox();
|
||||
&Header::openbox('100%', 'center', "$graph $Lang::tr{'graph'}");
|
||||
if (-e "$graphdir/mbmon-$graph-month.png"){
|
||||
my $ftime = localtime((stat("$graphdir/mbmon-$graph-month.png"))[9]);
|
||||
print "<center>";
|
||||
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/mbmon-$graph-month.png' border='0' /><hr />";
|
||||
}
|
||||
else{print $Lang::tr{'no information available'};}
|
||||
&Header::closebox();
|
||||
&Header::openbox('100%', 'center', "$graph $Lang::tr{'graph'}");
|
||||
if (-e "$graphdir/mbmon-$graph-year.png"){
|
||||
my $ftime = localtime((stat("$graphdir/mbmon-$graph-year.png"))[9]);
|
||||
print "<center>";
|
||||
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/mbmon-$graph-year.png' border='0' /><hr />";
|
||||
}
|
||||
else{print $Lang::tr{'no information available'};}
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
sub mbmonbox{
|
||||
|
||||
foreach (@mbmongraphs){
|
||||
chomp($_);
|
||||
my @name=split(/\./,$_);my $label = $name[0]; $label=~ s/-//;
|
||||
$mbmonsettings{'LABEL-'.$name[0]}="$label";
|
||||
$mbmonsettings{'LINE-'.$name[0]}="checked";
|
||||
}
|
||||
&General::readhash("${General::swroot}/mbmon/settings", \%mbmonsettings);
|
||||
|
||||
&Header::openbox('100%', 'center', "$Lang::tr{'mbmon settings'}");
|
||||
if ( $cgiparams{'ACTION'} eq $Lang::tr{'save'} ){print "Test";}
|
||||
|
||||
print <<END
|
||||
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||
<table width='100%' border='0' cellspacing='5' cellpadding='0' align='center'>
|
||||
<tr><td align='right' width='40%'><b>$Lang::tr{'mbmon display'}</b></td>
|
||||
<td align='left'><b>$Lang::tr{'mbmon label'}</b></td>
|
||||
</tr>
|
||||
END
|
||||
;
|
||||
foreach (@mbmongraphs){
|
||||
chomp($_);my @name=split(/\./,$_);
|
||||
print("<tr><td align='right'><input type='checkbox' name='LINE-$name[0]' $mbmonsettings{'LINE-'.$name[0]} /></td>");
|
||||
print("<td><input type='text' name='LABEL-$name[0]' value='$mbmonsettings{'LABEL-'.$name[0]}' size='25' /></td></tr>\n");
|
||||
}
|
||||
print <<END
|
||||
<tr><td align='center' colspan='2' ><input type='submit' name='ACTION' value=$Lang::tr{'save'} /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
END
|
||||
;
|
||||
&Header::closebox();
|
||||
}
|
||||
#!/usr/bin/perl
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
use strict;
|
||||
|
||||
# enable only the following on debugging purpose
|
||||
#use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
require "${General::swroot}/graphs.pl";
|
||||
|
||||
my %sensorsettings = ();
|
||||
my %cgiparams=();
|
||||
my @cgigraphs=();
|
||||
my $rrdlog = "/var/log/rrd";
|
||||
|
||||
&Header::showhttpheaders();
|
||||
|
||||
my $graphdir = "/srv/web/ipfire/html/graphs";
|
||||
|
||||
$ENV{'QUERY_STRING'} =~ s/&//g;
|
||||
@cgigraphs = split(/graph=/,$ENV{'QUERY_STRING'});
|
||||
$cgigraphs[1] = '' unless defined $cgigraphs[1];
|
||||
|
||||
my @sensorsgraphs = ();
|
||||
my @sensorsdir = `ls -dA $rrdlog/collectd/localhost/sensors-*/`;
|
||||
foreach (@sensorsdir)
|
||||
{
|
||||
chomp($_);chop($_);
|
||||
foreach (`ls $_/*`){
|
||||
chomp($_);
|
||||
push(@sensorsgraphs,$_);
|
||||
}
|
||||
}
|
||||
|
||||
&Header::getcgihash(\%sensorsettings);
|
||||
|
||||
if ( $sensorsettings{'ACTION'} eq $Lang::tr{'save'} ) {
|
||||
foreach(@sensorsgraphs){
|
||||
chomp($_);
|
||||
$_ =~ /\/(.*)sensors-(.*)\/(.*)\.rrd/;
|
||||
my $label = $2.$3;$label=~ s/-//g;
|
||||
if ( $sensorsettings{'LINE-'.$label} ne "on" ){$sensorsettings{'LINE-'.$label} = 'off';}
|
||||
elsif ( $sensorsettings{'LINE-'.$label} eq "on" ){$sensorsettings{'LINE-'.$label} = 'checked';}
|
||||
}
|
||||
&General::writehash("${General::swroot}/sensors/settings", \%sensorsettings);
|
||||
}
|
||||
|
||||
my @disks = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`;
|
||||
|
||||
&Header::openpage($Lang::tr{'harddisk temperature graphs'}, 1, '');
|
||||
&Header::openbigbox('100%', 'left');
|
||||
|
||||
if ($cgigraphs[1] =~ /hwtemp/) {&Graphs::updatehwtempgraph ("hour");&Graphs::updatehwtempgraph ("week");&Graphs::updatehwtempgraph ("month");&Graphs::updatehwtempgraph ("year");graphbox("hwtemp");}
|
||||
elsif ($cgigraphs[1] =~ /hwfan/) {&Graphs::updatehwfangraph ("hour");&Graphs::updatehwfangraph ("week");&Graphs::updatehwfangraph ("month");&Graphs::updatehwfangraph ("year");graphbox("hwfan");}
|
||||
elsif ($cgigraphs[1] =~ /hwvolt/) {&Graphs::updatehwvoltgraph ("hour");&Graphs::updatehwvoltgraph ("week");&Graphs::updatehwvoltgraph ("month");&Graphs::updatehwvoltgraph ("year");graphbox("hwvolt");}
|
||||
elsif ($cgigraphs[1] =~ /hddtemp/) {
|
||||
foreach (@disks){
|
||||
my $disk = $_;
|
||||
chomp $disk;
|
||||
my @array = split(/\//,$disk);
|
||||
&Graphs::updatehddgraph ($array[$#array],"week");&Graphs::updatehddgraph ($array[$#array],"month");&Graphs::updatehddgraph ($array[$#array],"year");
|
||||
hddtempbox($array[$#array]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
&Graphs::updatehwtempgraph ("day");&Graphs::updatehwfangraph ("day");&Graphs::updatehwvoltgraph ("day");
|
||||
foreach (@disks){
|
||||
my $disk = $_;
|
||||
chomp $disk;
|
||||
my @array = split(/\//,$disk);
|
||||
&Graphs::updatehddgraph ($array[$#array],"day");
|
||||
if (-e "$graphdir/hddtemp-$disk-day.png") {
|
||||
|
||||
&Header::openbox('100%', 'center', "Disk $disk $Lang::tr{'graph'}");
|
||||
my $ftime = localtime((stat("$graphdir/hddtemp-$disk-day.png"))[9]);
|
||||
print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<a href='/cgi-bin/hardwaregraphs.cgi?graph=hddtemp'>";
|
||||
print "<img src='/graphs/hddtemp-$disk-day.png' border='0' />";
|
||||
print "</a>";
|
||||
print "<br />\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
}
|
||||
|
||||
my @graphs = ("hwtemp","hwfan","hwvolt");
|
||||
foreach (@graphs){
|
||||
&Header::openbox('100%', 'center', "$_ $Lang::tr{'graph'}");
|
||||
if (-e "$graphdir/sensors-$_-day.png"){
|
||||
my $ftime = localtime((stat("$graphdir/sensors-$_-day.png"))[9]);
|
||||
print "<center>";
|
||||
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<a href='/cgi-bin/hardwaregraphs.cgi?graph=$_'>";
|
||||
print "<img src='/graphs/sensors-$_-day.png' border='0' />";
|
||||
print "</a><hr />";
|
||||
}
|
||||
else{print $Lang::tr{'no information available'};}
|
||||
&Header::closebox();
|
||||
}
|
||||
sensorsbox();
|
||||
}
|
||||
|
||||
&Header::closebigbox();
|
||||
&Header::closepage();
|
||||
|
||||
sub hddtempbox {
|
||||
my $disk = $_[0];
|
||||
if (-e "$graphdir/hddtemp-$disk-week.png") {
|
||||
|
||||
&Header::openbox('100%', 'center', "Disk $disk $Lang::tr{'graph'}");
|
||||
my $ftime = localtime((stat("$graphdir/hddtemp-$disk-week.png"))[9]);
|
||||
print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/hddtemp-$disk-week.png' border='0' />";
|
||||
print "<br />\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
if (-e "$graphdir/hddtemp-$disk-month.png") {
|
||||
|
||||
&Header::openbox('100%', 'center', "Disk $disk $Lang::tr{'graph'}");
|
||||
my $ftime = localtime((stat("$graphdir/hddtemp-$disk-month.png"))[9]);
|
||||
print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/hddtemp-$disk-month.png' border='0' />";
|
||||
print "<br />\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
if (-e "$graphdir/hddtemp-$disk-year.png") {
|
||||
|
||||
&Header::openbox('100%', 'center', "Disk $disk $Lang::tr{'graph'}");
|
||||
my $ftime = localtime((stat("$graphdir/hddtemp-$disk-year.png"))[9]);
|
||||
print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/hddtemp-$disk-year.png' border='0' />";
|
||||
print "<br />\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
}
|
||||
|
||||
sub graphbox {
|
||||
my $graph = $_[0];
|
||||
|
||||
&Header::openbox('100%', 'center', "$graph $Lang::tr{'graph'}");
|
||||
if (-e "$graphdir/sensors-$graph-week.png"){
|
||||
my $ftime = localtime((stat("$graphdir/sensors-$graph-week.png"))[9]);
|
||||
print "<center>";
|
||||
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/sensors-$graph-week.png' border='0' /><hr />";
|
||||
}
|
||||
else{print $Lang::tr{'no information available'};}
|
||||
&Header::closebox();
|
||||
&Header::openbox('100%', 'center', "$graph $Lang::tr{'graph'}");
|
||||
if (-e "$graphdir/sensors-$graph-month.png"){
|
||||
my $ftime = localtime((stat("$graphdir/sensors-$graph-month.png"))[9]);
|
||||
print "<center>";
|
||||
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/sensors-$graph-month.png' border='0' /><hr />";
|
||||
}
|
||||
else{print $Lang::tr{'no information available'};}
|
||||
&Header::closebox();
|
||||
&Header::openbox('100%', 'center', "$graph $Lang::tr{'graph'}");
|
||||
if (-e "$graphdir/sensors-$graph-year.png"){
|
||||
my $ftime = localtime((stat("$graphdir/sensors-$graph-year.png"))[9]);
|
||||
print "<center>";
|
||||
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<img src='/graphs/sensors-$graph-year.png' border='0' /><hr />";
|
||||
}
|
||||
else{print $Lang::tr{'no information available'};}
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
sub sensorsbox{
|
||||
|
||||
&Header::openbox('100%', 'center', "$Lang::tr{'mbmon settings'}");
|
||||
if ( $cgiparams{'ACTION'} eq $Lang::tr{'save'} ){print "Test";}
|
||||
|
||||
print <<END
|
||||
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||
<table width='100%' border='0' cellspacing='5' cellpadding='0' align='center'>
|
||||
<tr><td align='right' width='40%'><b>$Lang::tr{'mbmon display'}</b></td>
|
||||
<td align='left'><b>$Lang::tr{'mbmon label'}</b></td>
|
||||
</tr>
|
||||
END
|
||||
;
|
||||
foreach (@sensorsgraphs){
|
||||
$_ =~ /\/(.*)sensors-(.*)\/(.*)\.rrd/;
|
||||
my $label = $2.$3;$label=~ s/-//g;
|
||||
$sensorsettings{'LABEL-'.$label}="$label";
|
||||
$sensorsettings{'LINE-'.$label}="checked";
|
||||
&General::readhash("${General::swroot}/sensors/settings", \%sensorsettings);
|
||||
print("<tr><td align='right'><input type='checkbox' name='LINE-$label' $sensorsettings{'LINE-'.$label} /></td>");
|
||||
print("<td><input type='text' name='LABEL-$label' value='$sensorsettings{'LABEL-'.$label}' size='25' /></td></tr>\n");
|
||||
}
|
||||
print <<END
|
||||
<tr><td align='center' colspan='2' ><input type='submit' name='ACTION' value=$Lang::tr{'save'} /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
END
|
||||
;
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ $(TARGET) :
|
||||
|
||||
# Create all directories
|
||||
for i in addon-lang auth backup ca certs connscheduler crls ddns dhcp dhcpc dmzholes \
|
||||
ethernet extrahd/bin fwlogs isdn key langs logging main mbmon menu.d modem net-traffic \
|
||||
ethernet extrahd/bin fwlogs isdn key langs logging main menu.d modem net-traffic \
|
||||
net-traffic/templates nfs optionsfw outgoing/bin patches pakfire portfw \
|
||||
ppp private proxy/advanced/cre proxy/calamaris/bin qos/bin red remote snort time tripwire/report \
|
||||
ppp private proxy/advanced/cre proxy/calamaris/bin qos/bin red remote sensors snort time tripwire/report \
|
||||
updatexlrator/bin updatexlrator/autocheck urlfilter/autoupdate urlfilter/bin upnp vpn \
|
||||
wakeonlan wireless xtaccess ; do \
|
||||
mkdir -p $(CONFIG_ROOT)/$$i; \
|
||||
@@ -82,7 +82,7 @@ $(TARGET) :
|
||||
cp $(DIR_SRC)/config/cfgroot/connscheduler-lib.pl $(CONFIG_ROOT)/connscheduler/lib.pl
|
||||
cp $(DIR_SRC)/config/cfgroot/connscheduler.conf $(CONFIG_ROOT)/connscheduler
|
||||
cp $(DIR_SRC)/config/extrahd/* $(CONFIG_ROOT)/extrahd/bin/
|
||||
cp $(DIR_SRC)/config/cfgroot/mbmon-settings $(CONFIG_ROOT)/mbmon/settings
|
||||
cp $(DIR_SRC)/config/cfgroot/sensors-settings $(CONFIG_ROOT)/sensors/settings
|
||||
cp $(DIR_SRC)/config/menu/* $(CONFIG_ROOT)/menu.d/
|
||||
cp $(DIR_SRC)/config/cfgroot/modem-defaults $(CONFIG_ROOT)/modem/defaults
|
||||
cp $(DIR_SRC)/config/cfgroot/modem-settings $(CONFIG_ROOT)/modem/settings
|
||||
|
||||
85
lfs/ipac-ng
85
lfs/ipac-ng
@@ -1,85 +0,0 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 1.31
|
||||
|
||||
THISAPP = ipac-ng-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = 0c010550adfc140bb3990eb02f1604d0
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-iptables-1.3.1.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-fetchcounter.patch
|
||||
cd $(DIR_APP) && sed -i -e 's%/var/lib/ipac%/var/log/ip-acct%g' configure
|
||||
cd $(DIR_APP) && chmod 755 configure
|
||||
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls --enable-default-storage=gdbm
|
||||
cd $(DIR_APP) && make
|
||||
cd $(DIR_APP) && make install
|
||||
ln -sf /bin/true /bin/mail
|
||||
-mkdir -p /var/log/ip-acct
|
||||
-mkdir -p /etc/ipac-ng
|
||||
cp -f $(DIR_SRC)/config/ipac-ng/*.conf /etc/ipac-ng/
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
78
lfs/mbmon
78
lfs/mbmon
@@ -1,78 +0,0 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 205
|
||||
|
||||
THISAPP = xmbmon$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = ab6614c785f5b653fcc69fb9c02058f0
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && ./configure --prefix=/usr
|
||||
cd $(DIR_APP) && make PROGRAM=mbmon
|
||||
cd $(DIR_APP) && install -o root -g wheel -m 4555 -c -p mbmon /usr/bin
|
||||
cd $(DIR_APP) && install -o root -g wheel -m 444 -c -p mbmon.1 /usr/man/man1
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
2
make.sh
2
make.sh
@@ -417,7 +417,6 @@ buildipfire() {
|
||||
ipfiremake libupnp
|
||||
ipfiremake ipp2p IPT=1
|
||||
ipfiremake linux-igd
|
||||
ipfiremake ipac-ng
|
||||
ipfiremake ipaddr
|
||||
ipfiremake iptstate
|
||||
ipfiremake iputils
|
||||
@@ -534,7 +533,6 @@ buildipfire() {
|
||||
ipfiremake portmap
|
||||
ipfiremake nfs
|
||||
ipfiremake nmap
|
||||
ipfiremake mbmon
|
||||
ipfiremake ncftp
|
||||
ipfiremake etherwake
|
||||
ipfiremake bwm-ng
|
||||
|
||||
Reference in New Issue
Block a user