1 |
diff -up smeserver-usbdisksmanager-0.2/root/etc/e-smith/web/functions/usbdisks.patch1 smeserver-usbdisksmanager-0.2/root/etc/e-smith/web/functions/usbdisks |
2 |
--- smeserver-usbdisksmanager-0.2/root/etc/e-smith/web/functions/usbdisks.patch1 2007-04-09 15:58:21.000000000 -0400 |
3 |
+++ smeserver-usbdisksmanager-0.2/root/etc/e-smith/web/functions/usbdisks 2012-06-27 21:27:51.000000000 -0400 |
4 |
@@ -341,7 +341,7 @@ sub subdevices ($) |
5 |
my %mounted=`mount`; |
6 |
my $mounted=`mount`; |
7 |
my %fstab= `cat /etc/fstab`; |
8 |
- my @blkid= `/sbin/blkid`; |
9 |
+ my @blkid= `/sbin/blkid -c /dev/null`; |
10 |
my %disques; |
11 |
my $i = 0; |
12 |
#my %hashes = (clef =>"valeur", clef2 => "valeur2", [%tablo], %table); |
13 |
@@ -395,11 +395,20 @@ sub subdevices ($) |
14 |
} |
15 |
elsif ($udevinfo =~ /couldn\'t get the class device/) |
16 |
{ |
17 |
+ |
18 |
$disques{$i}{DEVTYPE}= "$tr_unknown"; |
19 |
} |
20 |
else |
21 |
{ |
22 |
- $disques{$i}{DEVTYPE}= $udevinfo; |
23 |
+ my $infobis=`cat /proc/mdstat |grep -o md[0-9]*`; |
24 |
+ if ($infobis =~ /$name/) |
25 |
+ { |
26 |
+ $disques{$i}{DEVTYPE}= "RAID"; |
27 |
+ } |
28 |
+ else |
29 |
+ { |
30 |
+ $disques{$i}{DEVTYPE}= $udevinfo; |
31 |
+ } |
32 |
} |
33 |
$i++; |
34 |
} |