X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fmedia.cgi;h=2aec3cce1d5a5d81c04cf3c8e7a66de6119f2fe6;hp=9456c3c220b4072f59435513ba3fe275c88c5be2;hb=8b40eca59ec98f19544e68342db7ee24d5983aa6;hpb=051cb353c6497ee22222a876e09472e048d20115 diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi index 9456c3c22..2aec3cce1 100644 --- a/html/cgi-bin/media.cgi +++ b/html/cgi-bin/media.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2008 Michael Tremer & Christian Schmidt # +# Copyright (C) 2007-2013 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 # @@ -45,9 +45,9 @@ my @querry = split(/\?/,$ENV{'QUERY_STRING'}); $querry[0] = '' unless defined $querry[0]; $querry[1] = 'hour' unless defined $querry[1]; -my @devices = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`; +my @devices = `ls -1 /sys/block | grep -E '^sd|^mmcblk|^xvd|^vd|^md' | sort | uniq`; -if ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" || $querry[0] =~ "xvd??"){ +if ( $querry[0] =~ "sd?" || $querry[0] =~ "mmcblk?" || $querry[0] =~ "xvd??" || $querry[0] =~ "vd?" || $querry[0] =~ "md*" ){ print "Content-type: image/png\n\n"; binmode(STDOUT); @@ -152,7 +152,7 @@ END for(my $i = 1; $i <= $#iostat1; $i++){ if ( $i eq '1' ){ - print "DeviceMB readMB writen"; + print "$Lang::tr{'device'}MB readMB writen"; }else{ print "$iostat1[$i]$iostat2[$i]$iostat3[$i]"; } @@ -206,9 +206,9 @@ sub diskbox { if ( $status[1]=~/standby/){ my $ftime = localtime((stat("/var/run/hddshutdown-$disk"))[9]); - print"Disk $disk status:".$status[1]." (since $ftime)"; + print"Disk $disk status:".$status[1]." ($Lang::tr{'since'} $ftime)"; }else{ - print"Disk $disk status:".$status[1].""; + print"Disk $disk status:".$status[1].""; } } @@ -217,7 +217,7 @@ sub diskbox { print < END ;