Добавлено обновление LiveHDD меню

parent ba81ddcf2e
commit 4098113df3

@ -165,21 +165,32 @@ class ClBuilderImageAction(Action):
'method': 'Builder.mount_target(cl_builder_target)',
'condition': lambda Get: Get('cl_builder_build')
},
{'name': 'image_menu',
{'name': 'flash_menu',
'method': 'Builder.set_builder_action("%s")' % Actions.ImageMenu,
'condition': lambda Get: Get('cl_builder_rescratch_set') == 'on'
},
{'name': 'image_menu:remove_flash_tmp',
{'name': 'flash_menu:remove_flash_tmp',
'method': 'Builder.remove_flash_tmp()'
},
{'name': 'image_menu:sync_vmlinuz',
{'name': 'flash_menu:sync_vmlinuz',
'message': __("Extracting kernels from ISO images"),
'method': 'Builder.sync_vmlinuz(cl_builder_flash_path)'
},
{'name': 'image_menu:update_menu',
{'name': 'flash_menu:update_menu',
'message': __("Recreating ISO image menu"),
'method': 'Builder.update_menu(cl_builder_flash_path)',
},
{'name': 'grub_menu',
'method': 'Builder.set_builder_action("%s")' % Actions.ImageMenu,
'condition': lambda Get: (
Get('cl_builder_grub_refresh_set') == 'on')
},
{'name': 'grub_menu:update_grub_menu',
'message': __("Creating the ISO images menu"),
'method': 'Builder.create_iso_grub_cfg(cl_builder_livemenu_path)',
'condition': lambda Get: (
Get('builder.cl_builder_livemenu_path') != "")
},
]
},
{'name': 'failed',

@ -1568,3 +1568,18 @@ class VariableClBuilderFlashUuid(ReadonlyVariable):
'install.os_disk_uuid',
install_os_disk_dev=dev, limit=1)
return ""
class VariableClBuilderGrubRefreshSet(ReadonlyVariable):
"""
Обновить меню grub (HDD c включенным LiveHDD или isoscan-grub
"""
def get(self):
root_type_ext = self.Get('os_root_type_ext')
action = self.Get('cl_action')
if action == Actions.Image:
if root_type_ext in RootType.HDDs:
if self.Get('cl_livepath_menu'):
return "on"
elif root_type_ext in RootType.IsoScanGrub:
return "on"
return "off"

Loading…
Cancel
Save