summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-04-17 16:23:24 +0200
committerGitHub <noreply@github.com>2025-04-17 16:23:24 +0200
commit54df1043f123f0c6f2140d8cf402657a7f0c9565 (patch)
tree43087a46788bcd263d0c4928bebc9fbdc8a723dc /src/conf_mode
parent9deb059d3d781b1fdc0f3dd707590979426f3370 (diff)
parent3fe5f8fb95a444ecb5b8489736a2e33419746f93 (diff)
downloadvyos-1x-54df1043f123f0c6f2140d8cf402657a7f0c9565.tar.gz
vyos-1x-54df1043f123f0c6f2140d8cf402657a7f0c9565.zip
Merge pull request #4453 from c-po/kernel-cmdline-T7327
grub: T7327: honor "system option kernel" settings during image upgrade
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/system_option.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py
index 064a1aa91..b45a9d8a6 100755
--- a/src/conf_mode/system_option.py
+++ b/src/conf_mode/system_option.py
@@ -122,6 +122,10 @@ def generate(options):
render(ssh_config, 'system/ssh_config.j2', options)
render(usb_autosuspend, 'system/40_usb_autosuspend.j2', options)
+ # XXX: This code path and if statements must be kept in sync with the Kernel
+ # option handling in image_installer.py:get_cli_kernel_options(). This
+ # occurance is used for having the appropriate options passed to GRUB
+ # when re-configuring options on the CLI.
cmdline_options = []
if 'kernel' in options:
if 'disable_mitigations' in options['kernel']:
@@ -131,8 +135,7 @@ def generate(options):
if 'amd_pstate_driver' in options['kernel']:
mode = options['kernel']['amd_pstate_driver']
cmdline_options.append(
- f'initcall_blacklist=acpi_cpufreq_init amd_pstate={mode}'
- )
+ f'initcall_blacklist=acpi_cpufreq_init amd_pstate={mode}')
grub_util.update_kernel_cmdline_options(' '.join(cmdline_options))
return None