mirror of https://github.com/eLvErDe/hwraid.git
[megaclisas-status] Improve looking for Megacli a tad...
This commit is contained in:
parent
2229dcc5cb
commit
123ef59da8
|
@ -85,12 +85,14 @@ def which(program):
|
|||
return None
|
||||
|
||||
# Find MegaCli
|
||||
megaclipath = which("MegaCli64")
|
||||
if (megaclipath == None):
|
||||
megaclipath = which("MegaCli")
|
||||
if (megaclipath == None):
|
||||
megaclipath = "MegaCli"
|
||||
|
||||
for megabin in "MegaCli64","MegaCli","megacli":
|
||||
dbgprint ('Looking for '+str(megabin)+' in PATH next..')
|
||||
megaclipath = which(megabin)
|
||||
if (megaclipath != None):
|
||||
break
|
||||
else:
|
||||
dbgprint ('Found MegaCLI here: '+str(megaclipath))
|
||||
|
||||
# Check binary exists (and +x), if not print an error message
|
||||
if os.path.exists(megaclipath) and os.access(megaclipath, os.X_OK):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue