diff options
author | John Estabrook <jestabro@vyos.io> | 2024-05-10 08:31:15 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2024-05-10 08:32:52 -0500 |
commit | 32658e981babffb5b7149534bd50a64d11f7c74f (patch) | |
tree | 23007ab232d4887e2ab3ec5285246393b846cd17 /python/vyos/system | |
parent | def74a8fa4e0fb9c7ef95bfb6daff8a4f1a9878f (diff) | |
download | vyos-1x-32658e981babffb5b7149534bd50a64d11f7c74f.tar.gz vyos-1x-32658e981babffb5b7149534bd50a64d11f7c74f.zip |
image-tools: T6327: drop boot console type ttyUSB
Diffstat (limited to 'python/vyos/system')
-rw-r--r-- | python/vyos/system/compat.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/python/vyos/system/compat.py b/python/vyos/system/compat.py index 1b487c1d2..94e40d268 100644 --- a/python/vyos/system/compat.py +++ b/python/vyos/system/compat.py @@ -220,14 +220,8 @@ def get_default(data: dict, root_dir: str = '') -> Union[int, None]: sublist = list(filter(lambda x: (x.get('version') == image_name and x.get('console_type') == console_type and - x.get('console_num') == console_num and x.get('bootmode') == 'normal'), menu_entries)) - # legacy images added with legacy tools omitted 'ttyUSB'; if entry not - # available, default to initial entry of version - if not sublist: - sublist = list(filter(lambda x: x.get('version') == image_name, - menu_entries)) if sublist: return menu_entries.index(sublist[0]) @@ -268,7 +262,9 @@ def update_version_list(root_dir: str = '') -> list[dict]: add = list(set(current_versions) - set(menu_versions)) for ver in add: last = menu_entries[0].get('version') - new = deepcopy(list(filter(lambda x: x.get('version') == last, + # copy legacy format of menu entries; ignore deprecated ttyUSB + new = deepcopy(list(filter(lambda x: (x.get('version') == last and + x.get('console_type') != 'ttyUSB'), menu_entries))) for e in new: boot_opts = grub.get_boot_opts(ver) |