Add variable for detect os using lvm and mdadm.

lvmraid
Mike Hiretsky 13 years ago
parent da2c15f909
commit 06bb8060de

@ -629,19 +629,30 @@ class fillVars(object, glob_attr):
return res.groups()[0]
return "cfq"
def get_os_install_lvm_set(self):
"""Using lvm"""
typeRoot = \
self.selectVar("os_disk_type",where="os_install_disk_mount",
eq="/")
return "on" if "lvm" in typeRoot else "off"
def get_os_install_mdadm_set(self):
"""Using mdadm"""
typeRoot = \
self.selectVar("os_disk_type",where="os_install_disk_mount",
eq="/")
return "on" if "raid" in typeRoot else "off"
def get_os_install_kernel_attr(self):
"""Kernel attributes"""
# on usb-hdd install must be "delay=5"
attr = ""
if self.Get('os_install_root_type') == 'usb-hdd':
attr = " scandelay=5"
typeRoot = \
self.selectVar("os_disk_type",where="os_install_disk_mount",
eq="/")
if "lvm" in typeRoot:
attr += " dolvm"
if "raid" in typeRoot:
attr += " domdadm"
if self.Get('os_install_mdadm_set') == 'on':
attr = += "domdadm"
if self.Get('os_install_lvm_set') == 'on':
attr = += "dolvm"
def get_os_install_kernel_resume(self):
"""install kernel resume parameter"""

@ -321,6 +321,12 @@ class Data:
# type of device for install
os_install_root_type = {'mode':'w'}
# using lvm
os_install_lvm_set = {}
# using mdadm
os_install_mdadm_set = {}
# proxy server for system
os_install_proxy = {'mode':'w',
'value':''}

Loading…
Cancel
Save