Fix get video driver for usb-hdd.

lvmraid
Mike Hiretsky 13 years ago
parent e9bd90b006
commit 44c8273855

@ -38,7 +38,7 @@ variable_value()
install_video_driver()
{
ebegin "Checking video drivers"
case `variable_value os_x11_video_drv` in
case `variable_value os_install_x11_video_drv` in
fglrx)
local drv="x11-drivers/ati-drivers"
;;

@ -25,7 +25,7 @@ from os import readlink,access,R_OK
from cl_utils import isMount,typeFile,getTupleVersion,pathJoin,isFstabMount,\
listDirectory, getAvailableVideo, getUUIDDict, \
isPkgInstalled, process, checkUtils, readLinesFile, \
lspci, getPartitionSize
lspci, getPartitionSize, getInstalledVideo
from cl_distr import DistributiveRepository,PartitionDistributive
from cl_fill import clLocale
from operator import itemgetter
@ -957,15 +957,14 @@ class fillVars(object, glob_attr):
def get_os_install_x11_video_drv(self):
"""Video driver used by xorg"""
if self.Get('os_install_root_type') == 'usb-hdd':
available_drivers = \
getAvailableVideo(prefix=self.Get('cl_chroot_path'))
prefix = self.Get('cl_chroot_path')
videoVal = self.getValueFromCmdLine("calculate","video")
videoVal = {'i915':'intel'}.get(videoVal,videoVal)
if not isPkgInstalled('xorg-server',
prefix=self.Get('cl_chroot_path')) or \
videoVal in available_drivers:
videoVal in getAvailableVideo(prefix=prefix):
return videoVal
return self.getVideoByDefault(available_drivers)
return self.getVideoByDefault(getInstalledVideo(prefix=prefix))
else:
return self.Get('os_x11_video_drv')

Loading…
Cancel
Save