mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
Merge branch 'master' of ssh://git.ipfire.org/srv/git/ipfire-2.x
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# #
|
# #
|
||||||
# IPFire.org - A linux based firewall #
|
# IPFire.org - A linux based firewall #
|
||||||
# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
|
# Copyright (C) 2005-2010 IPFire Team #
|
||||||
# #
|
# #
|
||||||
# This program is free software: you can redistribute it and/or modify #
|
# 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 #
|
# it under the terms of the GNU General Public License as published by #
|
||||||
@@ -53,7 +53,7 @@ if ( $mainsettings{'RRDLOG'} eq "" ){
|
|||||||
|
|
||||||
my $count = 0;
|
my $count = 0;
|
||||||
my @sensorsgraphs = ();
|
my @sensorsgraphs = ();
|
||||||
my @sensorsdir = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/`;
|
my @sensorsdir = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/ 2>/dev/null`;
|
||||||
foreach (@sensorsdir){
|
foreach (@sensorsdir){
|
||||||
chomp($_);chop($_);
|
chomp($_);chop($_);
|
||||||
foreach (`ls $_/*`){
|
foreach (`ls $_/*`){
|
||||||
@@ -100,7 +100,7 @@ sub makegraphbox {
|
|||||||
# collectd we are now able to handle any kind of cpucount
|
# collectd we are now able to handle any kind of cpucount
|
||||||
|
|
||||||
sub updatecpugraph {
|
sub updatecpugraph {
|
||||||
my $cpucount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/cpu-*/ | wc -l`;
|
my $cpucount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/cpu-*/ 2>/dev/null | wc -l`;
|
||||||
my $period = $_[0];
|
my $period = $_[0];
|
||||||
my @command = (
|
my @command = (
|
||||||
"-",
|
"-",
|
||||||
@@ -996,7 +996,7 @@ sub updateqosgraph {
|
|||||||
# Generate the CPU Frequency Graph for the current period of time for values given by collectd an lm_sensors
|
# Generate the CPU Frequency Graph for the current period of time for values given by collectd an lm_sensors
|
||||||
|
|
||||||
sub updatecpufreqgraph {
|
sub updatecpufreqgraph {
|
||||||
my $cpucount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/cpu-*/ | wc -l`;
|
my $cpucount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/cpu-*/ 2>/dev/null | wc -l`;
|
||||||
my $period = $_[0];
|
my $period = $_[0];
|
||||||
my @command = (
|
my @command = (
|
||||||
"-",
|
"-",
|
||||||
@@ -1042,7 +1042,7 @@ sub updatecpufreqgraph {
|
|||||||
# Generate the Thermal Zone Temp CPU Graph
|
# Generate the Thermal Zone Temp CPU Graph
|
||||||
|
|
||||||
sub updatethermaltempgraph {
|
sub updatethermaltempgraph {
|
||||||
my $thermalcount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/thermal-thermal_zone* | wc -l 2>/dev/null`;
|
my $thermalcount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/thermal-thermal_zone* 2>/dev/null | wc -l`;
|
||||||
my $period = $_[0];
|
my $period = $_[0];
|
||||||
my @command = (
|
my @command = (
|
||||||
"-",
|
"-",
|
||||||
@@ -1097,6 +1097,6 @@ sub random_hex_color {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub getprocesses {
|
sub getprocesses {
|
||||||
my @processesgraph = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/processes-*/`;
|
my @processesgraph = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/processes-*/ 2>/dev/null`;
|
||||||
return @processesgraph;
|
return @processesgraph;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,12 @@ srv/web/ipfire/cgi-bin/ids.cgi
|
|||||||
srv/web/ipfire/cgi-bin/outgoingfw.cgi
|
srv/web/ipfire/cgi-bin/outgoingfw.cgi
|
||||||
srv/web/ipfire/cgi-bin/outgoinggrp.cgi
|
srv/web/ipfire/cgi-bin/outgoinggrp.cgi
|
||||||
srv/web/ipfire/cgi-bin/pppsetup.cgi
|
srv/web/ipfire/cgi-bin/pppsetup.cgi
|
||||||
|
srv/web/ipfire/cgi-bin/hardwaregraphs.cgi
|
||||||
|
srv/web/ipfire/cgi-bin/memory.cgi
|
||||||
|
srv/web/ipfire/cgi-bin/netexternal.cgi
|
||||||
|
srv/web/ipfire/cgi-bin/netinternal.cgi
|
||||||
|
srv/web/ipfire/cgi-bin/system.cgi
|
||||||
|
srv/web/ipfire/cgi-bin/logs.cgi/log.dat
|
||||||
srv/web/ipfire/html/images/urlfilter/copy.gif
|
srv/web/ipfire/html/images/urlfilter/copy.gif
|
||||||
var/ipfire/general-functions.pl
|
var/ipfire/general-functions.pl
|
||||||
var/ipfire/graphs.pl
|
var/ipfire/graphs.pl
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../../../common/python
|
|
||||||
2558
config/rootfiles/packages/python-optional-src
Normal file
2558
config/rootfiles/packages/python-optional-src
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# #
|
# #
|
||||||
# IPFire.org - A linux based firewall #
|
# IPFire.org - A linux based firewall #
|
||||||
# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
|
# Copyright (C) 2005-2010 IPFire Team #
|
||||||
# #
|
# #
|
||||||
# This program is free software: you can redistribute it and/or modify #
|
# 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 #
|
# it under the terms of the GNU General Public License as published by #
|
||||||
@@ -93,7 +93,7 @@ if ( $querry[0] =~ "hwtemp"){
|
|||||||
&General::writehash("${General::swroot}/sensors/settings", \%sensorsettings);
|
&General::writehash("${General::swroot}/sensors/settings", \%sensorsettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
my @disks = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`;
|
my @disks = `kudzu -qps -c HD 2>/dev/null | grep device: | cut -d" " -f2 | sort | uniq`;
|
||||||
|
|
||||||
foreach (@disks){
|
foreach (@disks){
|
||||||
my $disk = $_;
|
my $disk = $_;
|
||||||
@@ -105,31 +105,31 @@ if ( $querry[0] =~ "hwtemp"){
|
|||||||
&Header::closebox();
|
&Header::closebox();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/thermal-thermal_zone*` ) {
|
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/thermal-thermal_zone* 2>/dev/null` ) {
|
||||||
&Header::openbox('100%', 'center', "ACPI Thermal-Zone Temp $Lang::tr{'graph'}");
|
&Header::openbox('100%', 'center', "ACPI Thermal-Zone Temp $Lang::tr{'graph'}");
|
||||||
&Graphs::makegraphbox("hardwaregraphs.cgi","thermaltemp","day");
|
&Graphs::makegraphbox("hardwaregraphs.cgi","thermaltemp","day");
|
||||||
&Header::closebox();
|
&Header::closebox();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/temperature-*` ) {
|
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/temperature-* 2>/dev/null` ) {
|
||||||
&Header::openbox('100%', 'center', "hwtemp $Lang::tr{'graph'}");
|
&Header::openbox('100%', 'center', "hwtemp $Lang::tr{'graph'}");
|
||||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwtemp","day","375");
|
&Graphs::makegraphbox("hardwaregraphs.cgi","hwtemp","day","375");
|
||||||
Header::closebox();
|
Header::closebox();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/fanspeed-*` ) {
|
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/fanspeed-* 2>/dev/null` ) {
|
||||||
&Header::openbox('100%', 'center', "hwfan $Lang::tr{'graph'}");
|
&Header::openbox('100%', 'center', "hwfan $Lang::tr{'graph'}");
|
||||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwfan","day");
|
&Graphs::makegraphbox("hardwaregraphs.cgi","hwfan","day");
|
||||||
&Header::closebox();
|
&Header::closebox();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/voltage-*` ) {
|
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/voltage-* 2>/dev/null` ) {
|
||||||
&Header::openbox('100%', 'center', "hwvolt $Lang::tr{'graph'}");
|
&Header::openbox('100%', 'center', "hwvolt $Lang::tr{'graph'}");
|
||||||
&Graphs::makegraphbox("hardwaregraphs.cgi","hwvolt","day","435");
|
&Graphs::makegraphbox("hardwaregraphs.cgi","hwvolt","day","435");
|
||||||
&Header::closebox();
|
&Header::closebox();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*` ) {
|
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-* 2>/dev/null` ) {
|
||||||
sensorsbox();
|
sensorsbox();
|
||||||
}
|
}
|
||||||
&Header::closebigbox();
|
&Header::closebigbox();
|
||||||
|
|||||||
@@ -26,10 +26,6 @@ my %mainsettings = ();
|
|||||||
|
|
||||||
use POSIX();
|
use POSIX();
|
||||||
|
|
||||||
#workaround to suppress a warning when a variable is used only once
|
|
||||||
my @dummy = ( ${Header::table2colour} );
|
|
||||||
undef (@dummy);
|
|
||||||
|
|
||||||
my %cgiparams=();
|
my %cgiparams=();
|
||||||
my %logsettings=();
|
my %logsettings=();
|
||||||
my $errormessage = '';
|
my $errormessage = '';
|
||||||
@@ -171,7 +167,7 @@ my $date = $cgiparams{'DAY'} == 0 ? '' : $cgiparams{'DAY'} <= 9 ? "0$cgiparams{
|
|||||||
# calculate end of active week (saturday 23H59)
|
# calculate end of active week (saturday 23H59)
|
||||||
my @then = ();
|
my @then = ();
|
||||||
@then = localtime(time());
|
@then = localtime(time());
|
||||||
my $sunday = POSIX::mktime( 0, 0, 0, @then[3], @then[4], @then[5]);
|
my $sunday = POSIX::mktime( 0, 0, 0, $then[3], $then[4], $then[5]);
|
||||||
$sunday += (6-$then[6]) * 86400;
|
$sunday += (6-$then[6]) * 86400;
|
||||||
|
|
||||||
# Convert delta in second to full weeks
|
# Convert delta in second to full weeks
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# #
|
# #
|
||||||
# IPFire.org - A linux based firewall #
|
# IPFire.org - A linux based firewall #
|
||||||
# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
|
# Copyright (C) 2005-2010 IPFire Team #
|
||||||
# #
|
# #
|
||||||
# This program is free software: you can redistribute it and/or modify #
|
# 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 #
|
# it under the terms of the GNU General Public License as published by #
|
||||||
@@ -56,7 +56,7 @@ if ( $querry[0] =~ "memory"){
|
|||||||
&Graphs::makegraphbox("memory.cgi","memory","day");
|
&Graphs::makegraphbox("memory.cgi","memory","day");
|
||||||
&Header::closebox();
|
&Header::closebox();
|
||||||
|
|
||||||
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/swap` ) {
|
if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/swap 2>/dev/null` ) {
|
||||||
&Header::openbox('100%', 'center', "Swap $Lang::tr{'graph'}");
|
&Header::openbox('100%', 'center', "Swap $Lang::tr{'graph'}");
|
||||||
&Graphs::makegraphbox("memory.cgi","swap","day");
|
&Graphs::makegraphbox("memory.cgi","swap","day");
|
||||||
&Header::closebox();
|
&Header::closebox();
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# #
|
# #
|
||||||
# IPFire.org - A linux based firewall #
|
# IPFire.org - A linux based firewall #
|
||||||
# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
|
# Copyright (C) 2005-2010 IPFire Team #
|
||||||
# #
|
# #
|
||||||
# This program is free software: you can redistribute it and/or modify #
|
# 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 #
|
# it under the terms of the GNU General Public License as published by #
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# #
|
# #
|
||||||
# IPFire.org - A linux based firewall #
|
# IPFire.org - A linux based firewall #
|
||||||
# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
|
# Copyright (C) 2005-2010 IPFire Team #
|
||||||
# #
|
# #
|
||||||
# This program is free software: you can redistribute it and/or modify #
|
# 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 #
|
# it under the terms of the GNU General Public License as published by #
|
||||||
@@ -64,7 +64,7 @@ if ( $querry[0] =~ /wireless/ ){
|
|||||||
if ($netsettings{'BLUE_DEV'}) {push (@graphs, ($netsettings{'BLUE_DEV'})); }
|
if ($netsettings{'BLUE_DEV'}) {push (@graphs, ($netsettings{'BLUE_DEV'})); }
|
||||||
if ($netsettings{'ORANGE_DEV'}) {push (@graphs, ($netsettings{'ORANGE_DEV'})); }
|
if ($netsettings{'ORANGE_DEV'}) {push (@graphs, ($netsettings{'ORANGE_DEV'})); }
|
||||||
|
|
||||||
my @wirelessgraphs = `ls -dA /var/log/rrd/collectd/localhost/wireless*`;
|
my @wirelessgraphs = `ls -dA /var/log/rrd/collectd/localhost/wireless* 2>/dev/null`;
|
||||||
foreach (@wirelessgraphs){
|
foreach (@wirelessgraphs){
|
||||||
$_ =~ /(.*)\/wireless-(.*)/;
|
$_ =~ /(.*)\/wireless-(.*)/;
|
||||||
push(@wireless,$2);
|
push(@wireless,$2);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# #
|
# #
|
||||||
# IPFire.org - A linux based firewall #
|
# IPFire.org - A linux based firewall #
|
||||||
# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
|
# Copyright (C) 2005-2010 IPFire Team #
|
||||||
# #
|
# #
|
||||||
# This program is free software: you can redistribute it and/or modify #
|
# 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 #
|
# it under the terms of the GNU General Public License as published by #
|
||||||
|
|||||||
37
lfs/python-optional-src
Normal file
37
lfs/python-optional-src
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
###############################################################################
|
||||||
|
# #
|
||||||
|
# IPFire.org - A linux based firewall #
|
||||||
|
# Copyright (C) 2010 IPFire Team <info@ipfire.org> #
|
||||||
|
# #
|
||||||
|
# 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 = 2.7
|
||||||
|
|
||||||
|
include python
|
||||||
|
|
||||||
|
PROG = python-optional-src
|
||||||
|
PAK_VER = 1
|
||||||
|
DEPS =
|
||||||
|
|
||||||
|
dist:
|
||||||
|
@$(PAK)
|
||||||
|
|
||||||
Reference in New Issue
Block a user