]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/hardwaregraphs.cgi
Merge remote-tracking branch 'origin/next' into kernel-4.14
[ipfire-2.x.git] / html / cgi-bin / hardwaregraphs.cgi
index b0e925439fdfb4c0fc91783a2ee79ee9903f991a..f5999c87ebee88e97faf0692de3134d2e033a4e0 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2005-2010  IPFire Team                                        #
+# 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,13 +67,13 @@ if ( $querry[0] =~ "hwtemp"){
        print "Content-type: image/png\n\n";
        binmode(STDOUT);
        &Graphs::updatethermaltempgraph($querry[1]);
-}elsif ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" || $querry[0] =~ "xvd??" ){
+}elsif ( $querry[0] =~ "sd?" ){
        print "Content-type: image/png\n\n";
        binmode(STDOUT);
        &Graphs::updatehddgraph($querry[0],$querry[1]);
 }else{
        &Header::showhttpheaders();
-       &Header::openpage($Lang::tr{'harddisk temperature graphs'}, 1, '');
+       &Header::openpage($Lang::tr{'hardware graphs'}, 1, '');
        &Header::openbigbox('100%', 'left');
 
        &Header::getcgihash(\%sensorsettings);
@@ -93,7 +93,7 @@ if ( $querry[0] =~ "hwtemp"){
                &General::writehash("${General::swroot}/sensors/settings", \%sensorsettings);
        }
 
-       my @disks = `kudzu -qps -c HD 2>/dev/null | grep device: | cut -d" " -f2 | sort | uniq`;
+       my @disks = `ls -1 /sys/block | grep -E '^sd' | sort | uniq`;
 
        foreach (@disks){
                my $disk = $_;
@@ -113,7 +113,7 @@ if ( $querry[0] =~ "hwtemp"){
 
        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");
+               &Graphs::makegraphbox("hardwaregraphs.cgi","hwtemp","day");
                Header::closebox();
        }
 
@@ -125,7 +125,7 @@ if ( $querry[0] =~ "hwtemp"){
 
        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");
+               &Graphs::makegraphbox("hardwaregraphs.cgi","hwvolt","day");
                &Header::closebox();
        }