summaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-11-09 14:34:24 -0600
committerJohn Estabrook <jestabro@vyos.io>2023-11-16 12:53:36 -0600
commitbd701768796d6ebb03ca943faf96d1dbea030edd (patch)
tree44513ae5d8110581926278f541897b8d6a5936e2 /src/system
parentfc5dc00a3892fa26d03213854ea5091d6b0c2c18 (diff)
downloadvyos-1x-bd701768796d6ebb03ca943faf96d1dbea030edd.tar.gz
vyos-1x-bd701768796d6ebb03ca943faf96d1dbea030edd.zip
image: T4516: ensure compatibility with legacy RAID 1 installs
Diffstat (limited to 'src/system')
-rw-r--r--src/system/grub_update.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/system/grub_update.py b/src/system/grub_update.py
index da1986e9d..366a85344 100644
--- a/src/system/grub_update.py
+++ b/src/system/grub_update.py
@@ -55,7 +55,10 @@ if __name__ == '__main__':
vyos_menuentries = compat.parse_menuentries(grub_cfg_main)
vyos_versions = compat.find_versions(vyos_menuentries)
unparsed_items = compat.filter_unparsed(grub_cfg_main)
-
+ # compatibilty for raid installs
+ search_root = compat.get_search_root(unparsed_items)
+ common_dict = {}
+ common_dict['search_root'] = search_root
# find default values
default_entry = vyos_menuentries[int(vars['default'])]
default_settings = {
@@ -66,11 +69,6 @@ if __name__ == '__main__':
}
vars.update(default_settings)
- # print(f'vars: {vars}')
- # print(f'modules: {modules}')
- # print(f'vyos_menuentries: {vyos_menuentries}')
- # print(f'unparsed_items: {unparsed_items}')
-
# create new files
grub_cfg_vars = f'{root_dir}/{grub.CFG_VYOS_VARS}'
grub_cfg_modules = f'{root_dir}/{grub.CFG_VYOS_MODULES}'
@@ -81,8 +79,7 @@ if __name__ == '__main__':
Path(image.GRUB_DIR_VYOS).mkdir(exist_ok=True)
grub.vars_write(grub_cfg_vars, vars)
grub.modules_write(grub_cfg_modules, modules)
- # Path(grub_cfg_platform).write_text(unparsed_items)
- grub.common_write()
+ grub.common_write(grub_common=common_dict)
render(grub_cfg_menu, grub.TMPL_GRUB_MENU, {})
render(grub_cfg_options, grub.TMPL_GRUB_OPTS, {})