diff options
author | Christian Breunig <christian@breunig.cc> | 2024-05-10 18:50:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-10 18:50:10 +0200 |
commit | d0bfe6ddb92f4a0e3d19c26eb475cbc42f946480 (patch) | |
tree | 38bf27c7da5ee0d9bc4bedea93983d75ad2f800a /python/vyos/system | |
parent | def74a8fa4e0fb9c7ef95bfb6daff8a4f1a9878f (diff) | |
parent | 428d03e47e7d01b08ccb8cf1acc0ab8a53275286 (diff) | |
download | vyos-1x-d0bfe6ddb92f4a0e3d19c26eb475cbc42f946480.tar.gz vyos-1x-d0bfe6ddb92f4a0e3d19c26eb475cbc42f946480.zip |
Merge pull request #3443 from jestabro/fix-boot-console
image-tools: T6176: fixes for boot console
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) |