diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-09-09 19:29:03 +0000 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-09-09 19:29:03 +0000 |
| commit | abf7613f8d34d7ed7bc59e7883d584625a4dd65c (patch) | |
| tree | d3fc36115cb15bf449526ee815531cc83b9412e0 /src/migration-scripts/system | |
| parent | ae5df0f6d6055fa6477f1150aaca662cb8aef9d3 (diff) | |
| download | vyos-1x-abf7613f8d34d7ed7bc59e7883d584625a4dd65c.tar.gz vyos-1x-abf7613f8d34d7ed7bc59e7883d584625a4dd65c.zip | |
serial: T9269: test migration system 31 -> 32 for the console_type key
Commit bc0b4178b already covers a missing GRUB configuration, where
vars_read() returns an empty dict.
A non-empty dict without console_type still raises KeyError: vars_read()
drops variables written with an empty value, which
grub.set_serial_console() produces for a flavor carrying no console data.
Diffstat (limited to 'src/migration-scripts/system')
| -rw-r--r-- | src/migration-scripts/system/31-to-32 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/migration-scripts/system/31-to-32 b/src/migration-scripts/system/31-to-32 index e92473835..89b604a7f 100644 --- a/src/migration-scripts/system/31-to-32 +++ b/src/migration-scripts/system/31-to-32 @@ -39,8 +39,9 @@ def migrate(config: ConfigTree) -> None: vars_file: str = f'{root_dir}/{CFG_VYOS_VARS}' vars_current: dict[str, str] = vars_read(vars_file) # A system without persistent GRUB storage - like VyOS running inside a - # container - has no boot console we could detect - if not vars_current: + # container - has no boot console we could detect. Neither has one whose + # GRUB vars carry no console_type, e.g. a flavor that bakes no console data + if 'console_type' not in vars_current: return # Check if VyOS installation uses serial boot console |
