|
|
|
@ -24,7 +24,7 @@ from cl_vars_share import varsShare, clLocale
|
|
|
|
|
from os.path import exists as pathexists
|
|
|
|
|
from os import path
|
|
|
|
|
from cl_utils import isMount, genpassword, getAvailableX11Drivers, \
|
|
|
|
|
listDirectory,isPkgInstalled
|
|
|
|
|
listDirectory,isPkgInstalled,lspci
|
|
|
|
|
from utils import ip
|
|
|
|
|
from encrypt import getHash
|
|
|
|
|
|
|
|
|
@ -529,19 +529,21 @@ class fillVars(varsShare):
|
|
|
|
|
return valBoardName or "unknown"
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
def get_hr_video_name(self):
|
|
|
|
|
"""Get video name"""
|
|
|
|
|
pciVideo = list(sorted(lspci("VGA compatible").items()))
|
|
|
|
|
if pciVideo:
|
|
|
|
|
pciVideo = pciVideo[0][1]
|
|
|
|
|
vendor=pciVideo.get("vendor","").split(" ")[0]
|
|
|
|
|
name=pciVideo.get("name","")
|
|
|
|
|
if "[" in name and "]" in name:
|
|
|
|
|
name = name.partition("[")[2].partition("]")[0]
|
|
|
|
|
return "{vendor} {name}".format(vendor=vendor,name=name)
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
def get_hr_video(self):
|
|
|
|
|
"""Videocard vendor"""
|
|
|
|
|
lines=self._runos("lspci")
|
|
|
|
|
if not lines:
|
|
|
|
|
return ""
|
|
|
|
|
reVGA = re.compile("vga",re.I)
|
|
|
|
|
foundVGA = False
|
|
|
|
|
for line in lines:
|
|
|
|
|
if reVGA.search(line):
|
|
|
|
|
foundVGA = True
|
|
|
|
|
break
|
|
|
|
|
if not foundVGA:
|
|
|
|
|
return "vesa"
|
|
|
|
|
line = self.Get('hr_video_name')
|
|
|
|
|
if "nVidia" in line or "GeForce" in line:
|
|
|
|
|
return "nvidia"
|
|
|
|
|
elif "ATI" in line:
|
|
|
|
|