Fix block device detection for graphs and other scripts.

This commit is contained in:
Arne Fitzenreiter
2012-01-16 22:22:17 +01:00
parent d520da1704
commit 269e21c662
6 changed files with 13 additions and 7 deletions

View File

@@ -22,7 +22,8 @@
# IPFire HDD Shutdown state reader
#
my @devices = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`;
# Also devices that cannot shutdown must be here for mediagraphs.
my @devices = `ls -1 /sys/block | grep -E '^sd|^xvd|^vd|^md' | sort | uniq`;
my $diskstats = "";
my $newdiskstats = "";
my $debug = 1;