From: Arne Fitzenreiter Date: Sat, 24 Sep 2011 09:53:08 +0000 (+0200) Subject: cgi's: replace kudzu. X-Git-Tag: v2.9-core54~13^2~53^2^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e18d32b6e38d050b464ca6a1894e8f32e64dc45;p=people%2Fms%2Fipfire-2.x.git cgi's: replace kudzu. --- diff --git a/html/cgi-bin/hardwaregraphs.cgi b/html/cgi-bin/hardwaregraphs.cgi index b0e925439f..e32f07c254 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) 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 # @@ -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 = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`; foreach (@disks){ my $disk = $_; diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi index 9456c3c220..9fbb041323 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-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 # @@ -45,7 +45,7 @@ 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 = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`; if ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" || $querry[0] =~ "xvd??"){ print "Content-type: image/png\n\n";