|
|
|
@ -802,7 +802,7 @@ class VariableOsLocationDest(LocationHelper,Variable):
|
|
|
|
|
installTypes = zip(self.Get('os_install_disk_dev'),
|
|
|
|
|
self.Get('os_install_disk_type'))
|
|
|
|
|
for checkType in ("raid","lvm"):
|
|
|
|
|
memberData = filter(lambda x:checkType in x[1],
|
|
|
|
|
memberData = filter(lambda x:checkType+"member" in x[1],
|
|
|
|
|
installTypes)
|
|
|
|
|
if memberData:
|
|
|
|
|
raise VariableError(
|
|
|
|
@ -1290,6 +1290,9 @@ class VariableOsInstallMbr(LocationHelper,Variable):
|
|
|
|
|
|
|
|
|
|
TODO: add get list of devices if install on RAID
|
|
|
|
|
"""
|
|
|
|
|
if self.Get('cl_autopartition_set') == 'auto' and \
|
|
|
|
|
self.Get('cl_autopartition_lvm_set') == 'on':
|
|
|
|
|
return self.Get('cl_autopartition_device')
|
|
|
|
|
if self.Get('os_install_root_type') in ("flash","usb-hdd"):
|
|
|
|
|
rootdev = self.Get('os_install_root_dev')
|
|
|
|
|
device = filter(lambda x:x in rootdev,
|
|
|
|
@ -1298,15 +1301,35 @@ class VariableOsInstallMbr(LocationHelper,Variable):
|
|
|
|
|
return [device[0]]
|
|
|
|
|
else:
|
|
|
|
|
return []
|
|
|
|
|
bootDev = self.Select('os_install_disk_dev',
|
|
|
|
|
where='os_install_disk_mount',
|
|
|
|
|
_in=('/','/boot'),sort="DESC",limit=1)
|
|
|
|
|
# if install on lvm detected
|
|
|
|
|
if self.Get('os_install_lvm_set') == "on":
|
|
|
|
|
if bootDev:
|
|
|
|
|
group = self.Select('os_lvm_vgname',
|
|
|
|
|
where='os_lvm_pvname',eq=bootDev)
|
|
|
|
|
disks = self.Select('os_lvm_pvname',
|
|
|
|
|
where='os_lvm_vgname',_in=group)
|
|
|
|
|
return self.Select('os_disk_parent',
|
|
|
|
|
where='os_disk_dev',
|
|
|
|
|
_in=disks)
|
|
|
|
|
if self.Get('os_install_mdadm_set') == "on":
|
|
|
|
|
if bootDev:
|
|
|
|
|
disks = self.Select('os_disk_parent',
|
|
|
|
|
where='os_disk_type',
|
|
|
|
|
like='raidmember\(%s\)'%bootDev)
|
|
|
|
|
if disks:
|
|
|
|
|
return disks
|
|
|
|
|
# if loaded system livecd
|
|
|
|
|
if self.Get('os_root_type') == "livecd":
|
|
|
|
|
# search /boot device or / device, by priority /boot,/
|
|
|
|
|
bootDev=self.Select('os_install_disk_parent',
|
|
|
|
|
bootDevice=self.Select('os_install_disk_parent',
|
|
|
|
|
where='os_install_disk_mount',
|
|
|
|
|
_in=('/','/boot'),
|
|
|
|
|
sort="DESC")[:1]
|
|
|
|
|
if bootDev:
|
|
|
|
|
return bootDev
|
|
|
|
|
# search /boot device or / device, by priority /boot,/
|
|
|
|
|
if bootDevice:
|
|
|
|
|
return bootDevice
|
|
|
|
|
if self.Get('os_device_dev'):
|
|
|
|
|
return [self.Get('os_device_dev')[0]]
|
|
|
|
|
return []
|
|
|
|
|