/[smecontribs]/rpms/smeserver-usbdisksmanager/contribs8/smeserver-usbdisksmanager-1.0-patch1.patch
ViewVC logotype

Contents of /rpms/smeserver-usbdisksmanager/contribs8/smeserver-usbdisksmanager-1.0-patch1.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Jun 27 04:30:19 2012 UTC (12 years, 5 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-usbdisksmanager-1_0-3_el5_sme, smeserver-usbdisksmanager-1_0-4_el5_sme, smeserver-usbdisksmanager-1_0-2_el5_sme, HEAD
pannel fix and locals

1 diff -up smeserver-usbdisksmanager-1.0/root/etc/e-smith/web/functions/usbdisks.patch1 smeserver-usbdisksmanager-1.0/root/etc/e-smith/web/functions/usbdisks
2 --- smeserver-usbdisksmanager-1.0/root/etc/e-smith/web/functions/usbdisks.patch1 2007-04-09 15:58:21.000000000 -0400
3 +++ smeserver-usbdisksmanager-1.0/root/etc/e-smith/web/functions/usbdisks 2012-06-26 23:12:10.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 @@ -376,12 +376,14 @@ sub subdevices ($)
14 # device type : usb ide sata/scsi
15 $disques{$i}{DEVTYPE}= "$tr_unknown";
16 my $name = $disques{$i}{name};
17 - my $udevinfo = `/usr/bin/udevinfo -a -p /sys/block/$name` ;
18 - if ($udevinfo =~ /BUS="ide"/)
19 + # my $udevinfo = `/usr/bin/udevinfo -a -p /sys/block/$name` ;
20 + # small change in udevinfo between rhel 4 and 5
21 + my $udevinfo = `/usr/bin/udevinfo -p /sys/block/$name -q env|grep "ID_BUS="|sed -e 's/^ID_//g'` ;
22 + if ($udevinfo =~ /BUS=ide/)
23 {
24 $disques{$i}{DEVTYPE}= "IDE";
25 }
26 - elsif ($udevinfo =~ /\/usb[0-9]+\//)
27 + elsif ($udevinfo =~ /BUS=usb/)
28 {
29 $disques{$i}{DEVTYPE}= "USB";
30 }
31 @@ -389,7 +391,7 @@ sub subdevices ($)
32 {
33 $disques{$i}{DEVTYPE}= "FireWire";
34 }
35 - elsif ($udevinfo =~ /BUS="scsi"/)
36 + elsif ($udevinfo =~ /BUS=scsi/)
37 {
38 $disques{$i}{DEVTYPE}= "SCSI_SATA";
39 }
40 @@ -399,7 +401,15 @@ sub subdevices ($)
41 }
42 else
43 {
44 - $disques{$i}{DEVTYPE}= $udevinfo;
45 + my $infobis=`cat /proc/mdstat |grep -o md[0-9]*`;
46 + if ($infobis =~ /$name/)
47 + {
48 + $disques{$i}{DEVTYPE}= "RAID";
49 + }
50 + else
51 + {
52 + $disques{$i}{DEVTYPE}= $udevinfo;
53 + }
54 }
55 $i++;
56 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed