@ -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 " "