diff options
author | Christian Breunig <christian@breunig.cc> | 2023-12-15 17:54:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-15 17:54:41 +0100 |
commit | 6b989703df53388eeaaece34da72fe94233764b9 (patch) | |
tree | a1b4a4ec3c2619f5cd4aabc08bcae0db06f85591 | |
parent | bddcb7cd52966c4852e40b8dc8f253303b877b04 (diff) | |
parent | 176bce88d3862b56e99b10ccf557dd4503bcc0bc (diff) | |
download | vyos-cloud-init-6b989703df53388eeaaece34da72fe94233764b9.tar.gz vyos-cloud-init-6b989703df53388eeaaece34da72fe94233764b9.zip |
Merge pull request #67 from zdc/T5220-equuleus
vyos_install: T5220: Fixed unbound variables
-rw-r--r-- | cloudinit/config/cc_vyos_install.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cloudinit/config/cc_vyos_install.py b/cloudinit/config/cc_vyos_install.py index 2c3629f8..7ca663ee 100644 --- a/cloudinit/config/cc_vyos_install.py +++ b/cloudinit/config/cc_vyos_install.py @@ -246,12 +246,15 @@ def grub_configure(grub_dir: str, vyos_version: str, vyos_version (str): VyOS version id boot_params (dict[str, str]): boot parameters """ - if boot_params['console_type'] == 'kvm': - default_boot = 0 - elif boot_params['console_type'] == 'serial': + if boot_params['console_type'] == 'serial': default_boot = 1 + else: + default_boot = 0 + if boot_params['cmdline_extra']: cmdline_extra = f' {boot_params["cmdline_extra"]}' + else: + cmdline_extra = '' grub_cfg_content: str = dedent(f''' # load EFI video modules if [ "${{grub_platform}}" == "efi" ]; then |