mirror of
				https://github.com/eLvErDe/hwraid.git
				synced 2025-10-31 19:34:11 +01:00 
			
		
		
		
	Merge pull request #12 from jhofeditz/master
[sas2ircu-status] fix for controller with no arrays created
This commit is contained in:
		
						commit
						56e930631b
					
				| @ -45,12 +45,18 @@ def getCtrlList(): | ||||
|   for line in res: | ||||
|     if re.match('^[0-9]+.*$',line): | ||||
|       ctrlnmbr,ctrlname=int(line.split()[0]),line.split()[1] | ||||
|       # Check if it's a RAID controller | ||||
|       # Check if it's a RAID controller and a volume exists | ||||
|       cmd=binarypath+' '+str(ctrlnmbr)+' DISPLAY' | ||||
|       res=getOutput(cmd) | ||||
|       raid=False | ||||
|       validarray=False | ||||
|       for line in res: | ||||
|         if re.match('^RAID Support\s+:\s+Yes$',line): | ||||
|           list.append([ctrlnmbr,ctrlname]) | ||||
|           raid=True | ||||
|         if re.match('^IR volume [0-9]+.*$',line): | ||||
|           validarray=True | ||||
|       if raid and validarray: | ||||
|         list.append([ctrlnmbr,ctrlname]) | ||||
|   # ie: [['0', 'SAS2008']] | ||||
|   return list | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user