diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-09-01 20:34:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-01 20:34:10 +0200 |
| commit | 611550d23ffbb0a90a9fbe24a17ec2bbbb09458b (patch) | |
| tree | 800005343cc9425b7b6769173761e27d4e44f9d0 /src | |
| parent | 6d2523edeed89e0d968df13b7ec656de5bbd2952 (diff) | |
| parent | 2faaa23085bd5beee1ed1b8a63dfa5be84375841 (diff) | |
| download | vyos-1x-611550d23ffbb0a90a9fbe24a17ec2bbbb09458b.tar.gz vyos-1x-611550d23ffbb0a90a9fbe24a17ec2bbbb09458b.zip | |
Merge pull request #5437 from c-po/containerlab
T9269: fix issues after recent GRUB serial console rewrites to support VyOS in container
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/system_option.py | 5 | ||||
| -rwxr-xr-x | src/op_mode/version.py | 18 |
2 files changed, 18 insertions, 5 deletions
diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py index 190db232d..6e7ced37a 100755 --- a/src/conf_mode/system_option.py +++ b/src/conf_mode/system_option.py @@ -600,6 +600,11 @@ def generate_cmdline_for_kexec(options): def apply(options): kexec_required, cmdline_new = generate_cmdline_for_kexec(options) + # T9269: a container does not own the Kernel cmdline - it belongs to the + # host system, thus neither kexec nor a reboot would apply anything and the + # options always compare as changed + if image.is_running_as_container(): + kexec_required = False if kexec_required: if not boot_configuration_complete() and os.getenv('VYOS_CONFIGD'): cmdl([ diff --git a/src/op_mode/version.py b/src/op_mode/version.py index b93e3081b..bc74f83fc 100755 --- a/src/op_mode/version.py +++ b/src/op_mode/version.py @@ -26,6 +26,7 @@ import vyos.version import vyos.limericks from vyos.utils.boot import is_uefi_system +from vyos.system.image import is_running_as_container from vyos.utils.system import get_secure_boot_state from jinja2 import Template @@ -47,11 +48,13 @@ Architecture: {{system_arch}} Boot via: {{boot_via}} System type: {{system_type}} Secure Boot: {{secure_boot}} +{%- if hardware_vendor is defined %} Hardware vendor: {{hardware_vendor}} Hardware model: {{hardware_model}} Hardware S/N: {{hardware_serial}} Hardware UUID: {{hardware_uuid}} +{%- endif %} Copyright: VyOS maintainers and contributors {%- if limerick %} @@ -61,11 +64,16 @@ Copyright: VyOS maintainers and contributors def _get_raw_data(funny=False): version_data = vyos.version.get_full_version_data() - version_data["secure_boot"] = "n/a (BIOS)" - if is_uefi_system(): - version_data["secure_boot"] = "disabled" - if get_secure_boot_state(): - version_data["secure_boot"] = "enabled" + # A container has no firmware of its own - it is not booted at all, thus + # neither the UEFI nor the BIOS wording applies + if is_running_as_container(): + version_data["secure_boot"] = "n/a (container)" + else: + version_data["secure_boot"] = "n/a (BIOS)" + if is_uefi_system(): + version_data["secure_boot"] = "disabled" + if get_secure_boot_state(): + version_data["secure_boot"] = "enabled" if funny: version_data["limerick"] = vyos.limericks.get_random() |
