mirror of
https://github.com/eLvErDe/hwraid.git
synced 2025-07-26 23:34:02 +02:00
Added OS Path.. (Rev 1.46)
This commit is contained in:
parent
5c1f9d68f4
commit
ba7aac9db9
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# $Id: megaclisas-status,v 1.45 2015/04/17 02:40:54 root Exp $
|
# $Id: megaclisas-status,v 1.46 2015/04/17 02:56:38 root Exp $
|
||||||
#
|
#
|
||||||
# Written by Adam Cecile <gandalf@NOSPAM.le-vert.net>
|
# Written by Adam Cecile <gandalf@NOSPAM.le-vert.net>
|
||||||
# Modified vy Vincent S. Cojot <vincent@NOSPAM.cojot.name>
|
# Modified vy Vincent S. Cojot <vincent@NOSPAM.cojot.name>
|
||||||
@ -466,7 +466,8 @@ if printarray:
|
|||||||
|
|
||||||
controllerid = 0
|
controllerid = 0
|
||||||
pcipath = ''
|
pcipath = ''
|
||||||
i = 0
|
diskpath = ''
|
||||||
|
i = 0 ; j = 0
|
||||||
mlen = 0
|
mlen = 0
|
||||||
rlen = 0
|
rlen = 0
|
||||||
while controllerid < controllernumber:
|
while controllerid < controllernumber:
|
||||||
@ -517,6 +518,12 @@ if printarray:
|
|||||||
output = getOutput(cmd)
|
output = getOutput(cmd)
|
||||||
arrayinfo = returnArrayInfo(output,controllerid, ldid)
|
arrayinfo = returnArrayInfo(output,controllerid, ldid)
|
||||||
|
|
||||||
|
diskprefix = str('/dev/disk/by-path/pci-' + pcipath + '-scsi-0:')
|
||||||
|
for j in range (8):
|
||||||
|
diskpath = diskprefix + str(j) + ':' + str(arrayinfo[7]) + ':0'
|
||||||
|
if os.path.exists(diskpath):
|
||||||
|
arrayinfo[7] = os.path.realpath(diskpath)
|
||||||
|
|
||||||
ldfmt = str('%-5s | %-'+str(rlen)+'s | %7s | %7s | %'+str(mlen)+'s | %8s | %-7s | %-8s | %-12s ')
|
ldfmt = str('%-5s | %-'+str(rlen)+'s | %7s | %7s | %'+str(mlen)+'s | %8s | %-7s | %-8s | %-12s ')
|
||||||
# Header
|
# Header
|
||||||
if ( i == 0 ):
|
if ( i == 0 ):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user