This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, master has been updated via 0d08de33a65c31386be41132230f9fba9028166c (commit) from 62990de7b73a507eab1d70b504c370a3230ffd79 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 0d08de33a65c31386be41132230f9fba9028166c Author: Christian Schmidt maniacikarus@ipfire.org Date: Sun Dec 12 20:40:56 2010 +0100
Some Fixes for the CGIs not spamming apache logfile.
-----------------------------------------------------------------------
Summary of changes: config/cfgroot/graphs.pl | 12 ++++++------ config/rootfiles/core/44/filelists/files | 6 ++++++ html/cgi-bin/hardwaregraphs.cgi | 14 +++++++------- html/cgi-bin/logs.cgi/log.dat | 6 +----- html/cgi-bin/memory.cgi | 4 ++-- html/cgi-bin/netexternal.cgi | 2 +- html/cgi-bin/netinternal.cgi | 4 ++-- html/cgi-bin/system.cgi | 2 +- 8 files changed, 26 insertions(+), 24 deletions(-)
Difference in files: diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index 7a0f643..1961246 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -3,7 +3,7 @@ ############################################################################### # # # 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 # # 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 @sensorsgraphs = (); -my @sensorsdir = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/`; +my @sensorsdir = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/ 2>/dev/null`; foreach (@sensorsdir){ chomp($_);chop($_); foreach (`ls $_/*`){ @@ -100,7 +100,7 @@ sub makegraphbox { # collectd we are now able to handle any kind of cpucount
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 @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
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 @command = ( "-", @@ -1042,7 +1042,7 @@ sub updatecpufreqgraph { # Generate the Thermal Zone Temp CPU Graph
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 @command = ( "-", @@ -1097,6 +1097,6 @@ sub random_hex_color { }
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; } diff --git a/config/rootfiles/core/44/filelists/files b/config/rootfiles/core/44/filelists/files index 5bb9b0a..3de21f5 100644 --- a/config/rootfiles/core/44/filelists/files +++ b/config/rootfiles/core/44/filelists/files @@ -16,6 +16,12 @@ srv/web/ipfire/cgi-bin/ids.cgi srv/web/ipfire/cgi-bin/outgoingfw.cgi srv/web/ipfire/cgi-bin/outgoinggrp.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 var/ipfire/general-functions.pl var/ipfire/graphs.pl diff --git a/html/cgi-bin/hardwaregraphs.cgi b/html/cgi-bin/hardwaregraphs.cgi index dabdfd1..b0e9254 100644 --- a/html/cgi-bin/hardwaregraphs.cgi +++ b/html/cgi-bin/hardwaregraphs.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # 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 # # 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); }
- 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){ my $disk = $_; @@ -105,31 +105,31 @@ if ( $querry[0] =~ "hwtemp"){ &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'}"); &Graphs::makegraphbox("hardwaregraphs.cgi","thermaltemp","day"); &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'}"); &Graphs::makegraphbox("hardwaregraphs.cgi","hwtemp","day","375"); 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'}"); &Graphs::makegraphbox("hardwaregraphs.cgi","hwfan","day"); &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'}"); &Graphs::makegraphbox("hardwaregraphs.cgi","hwvolt","day","435"); &Header::closebox(); }
- if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*` ) { + if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/sensors-* 2>/dev/null` ) { sensorsbox(); } &Header::closebigbox(); diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 8405c8f..fea9e6b 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -26,10 +26,6 @@ my %mainsettings = ();
use POSIX();
-#workaround to suppress a warning when a variable is used only once -my @dummy = ( ${Header::table2colour} ); -undef (@dummy); - my %cgiparams=(); my %logsettings=(); my $errormessage = ''; @@ -171,7 +167,7 @@ my $date = $cgiparams{'DAY'} == 0 ? '' : $cgiparams{'DAY'} <= 9 ? "0$cgiparams{ # calculate end of active week (saturday 23H59) my @then = (); @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;
# Convert delta in second to full weeks diff --git a/html/cgi-bin/memory.cgi b/html/cgi-bin/memory.cgi index a0a01b0..1708b0f 100644 --- a/html/cgi-bin/memory.cgi +++ b/html/cgi-bin/memory.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # 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 # # 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"); &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'}"); &Graphs::makegraphbox("memory.cgi","swap","day"); &Header::closebox(); diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi index 332774c..cd29d5d 100644 --- a/html/cgi-bin/netexternal.cgi +++ b/html/cgi-bin/netexternal.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # 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 # # it under the terms of the GNU General Public License as published by # diff --git a/html/cgi-bin/netinternal.cgi b/html/cgi-bin/netinternal.cgi index bf6840f..60560f3 100644 --- a/html/cgi-bin/netinternal.cgi +++ b/html/cgi-bin/netinternal.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # 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 # # 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{'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){ $_ =~ /(.*)/wireless-(.*)/; push(@wireless,$2); diff --git a/html/cgi-bin/system.cgi b/html/cgi-bin/system.cgi index 1ec07d0..4b8ee47 100644 --- a/html/cgi-bin/system.cgi +++ b/html/cgi-bin/system.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # 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 # # it under the terms of the GNU General Public License as published by #
hooks/post-receive -- IPFire 2.x development tree