|
|
|
@ -513,24 +513,6 @@ class fillVars(glob_attr):
|
|
|
|
|
break
|
|
|
|
|
return virtName
|
|
|
|
|
|
|
|
|
|
def getValueFromConfig(self,config,name):
|
|
|
|
|
"""Get value of parameter from bash type file
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
config config file name
|
|
|
|
|
name param name
|
|
|
|
|
"""
|
|
|
|
|
reMatch = re.compile("^%s\s*=\s*\"?(.*)\"?$"%name, re.I)
|
|
|
|
|
try:
|
|
|
|
|
if os.path.exists(config):
|
|
|
|
|
for line in open(config,"r").readlines():
|
|
|
|
|
match = reMatch.match(line)
|
|
|
|
|
if match:
|
|
|
|
|
return group().strip()
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def get_hr_board_model(self):
|
|
|
|
|
"""motherboard model"""
|
|
|
|
|
modelFile = "/sys/class/dmi/id/board_name"
|
|
|
|
|