Added variables and fix specifing mount points.

os_install_system_map for detect System.map
cl_install_kernel_uid for kernel_uid on installed system.
Fix using none mountPoint for discard transfering mount points.
netsetup
Mike Hiretsky 14 years ago
parent 072279e7d8
commit 6909966785

@ -935,6 +935,15 @@ class fillVars(object, glob_attr):
else:
return ""
def get_os_install_system_map(self):
systemmapfile = self.Get('os_install_kernel').replace('vmlinuz',
'System.map')
if systemmapfile.startswith('System.map') and path.exists(
path.join(self.Get('cl_chroot_path'),'boot',systemmapfile)):
return systemmapfile
else:
return ""
def get_os_grub_conf(self):
"""Use for generate grub.conf for new system"""
pathGrubConf = "/boot/grub/grub.conf"
@ -1066,3 +1075,18 @@ class fillVars(object, glob_attr):
return "off"
else:
return self.Get('cl_autoupdate_set')
def get_cl_install_kernel_uid(self):
uuidpath = '/dev/disk/by-uuid'
if not os.access(uuidpath,os.R_OK):
return ""
uuidDevs = filter(os.path.islink,map(lambda x: os.path.join(uuidpath,x),
os.listdir(uuidpath)))
mapDevUuid = dict(map(lambda x:(os.path.normpath(os.path.join(uuidpath,
os.readlink(x))),
os.path.basename(x)),
uuidDevs))
if self.Get('os_install_root_dev') in mapDevUuid:
return mapDevUuid[self.Get('os_install_root_dev')][:8]
else:
return ""

@ -380,7 +380,7 @@ class convertDictOpt:
if not allOptions:
raise InstallError(_("Unsupported file system %s")%realFileSystem)
for opt in realOptions:
if not opt in allOptions:
if opt and not opt in allOptions:
self.addFileSystemCorrupted(realFileSystem)
raise InstallError(_("Incorrect option %s")%opt)

@ -274,6 +274,12 @@ class Data:
# install config kernel filename
os_install_kernel_config = {}
# install system map filename
os_install_system_map = {}
# install kernel uid
cl_install_kernel_uid = {}
# filesystem format support by calcualte-install
os_format_type = {}

Loading…
Cancel
Save