|
|
|
@ -27,7 +27,7 @@ from cl_utils import isMount,typeFile,getTupleVersion,pathJoin,isFstabMount,\
|
|
|
|
|
getUdevDeviceInfo, getPartitionDevice, getPartitionSize, \
|
|
|
|
|
isPkgInstalled, process, checkUtils, readLinesFile, \
|
|
|
|
|
FStab, lspci, getInstalledVideo,getDeviceType, \
|
|
|
|
|
getPartitionType
|
|
|
|
|
getPartitionType, getOsProberHash
|
|
|
|
|
from cl_distr import DistributiveRepository,PartitionDistributive
|
|
|
|
|
from cl_fill import clLocale
|
|
|
|
|
from operator import itemgetter
|
|
|
|
@ -291,6 +291,8 @@ class fillVars(object, glob_attr):
|
|
|
|
|
disk_hash = {}
|
|
|
|
|
|
|
|
|
|
fstab = FStab('/etc/fstab')
|
|
|
|
|
distrRep = DistributiveRepository()
|
|
|
|
|
osProberHash = getOsProberHash(getContentFunc=distrRep._getfromcontent)
|
|
|
|
|
for disk in new_disks:
|
|
|
|
|
props = getUdevDeviceInfo(disk)
|
|
|
|
|
if not "DEVNAME" in props:
|
|
|
|
@ -310,6 +312,7 @@ class fillVars(object, glob_attr):
|
|
|
|
|
dev_hash['part'] = getPartitionType(props)
|
|
|
|
|
dev_hash['options'] = fstab.getBy(what=fstab.OPTS,eq=devName) or ""
|
|
|
|
|
dev_hash['size'] = getPartitionSize(disk)
|
|
|
|
|
dev_hash['content'] = osProberHash.get(devName,'')
|
|
|
|
|
if devParent in devicesHash and 'ID_PART_ENTRY_NUMBER' in props:
|
|
|
|
|
dev_hash['grub'] = "%s,%d"%(devicesHash[devParent]['map'],
|
|
|
|
|
int(props['ID_PART_ENTRY_NUMBER'])-1)
|
|
|
|
@ -470,6 +473,10 @@ class fillVars(object, glob_attr):
|
|
|
|
|
"""Partition type"""
|
|
|
|
|
return self.getAttributeFromHash('os_disk_hash','type')
|
|
|
|
|
|
|
|
|
|
def get_os_disk_content(self):
|
|
|
|
|
"""Partition content"""
|
|
|
|
|
return self.getAttributeFromHash('os_disk_hash','content')
|
|
|
|
|
|
|
|
|
|
def get_os_disk_name(self):
|
|
|
|
|
"""Label of partitions"""
|
|
|
|
|
return self.getAttributeFromHash('os_disk_hash','name')
|
|
|
|
|