summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system_option.py5
-rwxr-xr-xsrc/op_mode/version.py18
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()