]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/hardwaregraphs.cgi
ipsec: Allow to create firewall rules for IPsec input as well.
[people/teissler/ipfire-2.x.git] / html / cgi-bin / hardwaregraphs.cgi
index 16000de3db707083e85a4fe95543dc0f016e24d4..b0a5d3a36de7d94e506ec5d2f06f5cb13a319029 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2005-2011  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        #
@@ -67,7 +67,7 @@ if ( $querry[0] =~ "hwtemp"){
        print "Content-type: image/png\n\n";
        binmode(STDOUT);
        &Graphs::updatethermaltempgraph($querry[1]);
-}elsif ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" ){
+}elsif ( $querry[0] =~ "sd?" ){
        print "Content-type: image/png\n\n";
        binmode(STDOUT);
        &Graphs::updatehddgraph($querry[0],$querry[1]);
@@ -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 = `ls -1 /sys/block | grep -E '^sd' | 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();