summaryrefslogtreecommitdiff
path: root/data/templates/grub/grub_compat.j2
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-01-16 23:52:13 -0600
committerGitHub <noreply@github.com>2024-01-16 23:52:13 -0600
commit31d3d7263ee3082bb7f7dd722086e2ce5c892a03 (patch)
tree62c525749ed7beb7e89a59a265893edfcb055a11 /data/templates/grub/grub_compat.j2
parent6c39a9cb6df6bb56c02583f82d68edc8ef17241d (diff)
parent2afd5e5575a42bee4483e093e9611fa3363c8adc (diff)
downloadvyos-1x-31d3d7263ee3082bb7f7dd722086e2ce5c892a03.tar.gz
vyos-1x-31d3d7263ee3082bb7f7dd722086e2ce5c892a03.zip
Merge pull request #2840 from vyos/mergify/bp/sagitta/pr-2818
image-tools: T5923: update system_console.py for new GRUB file structure (backport #2818)
Diffstat (limited to 'data/templates/grub/grub_compat.j2')
-rw-r--r--data/templates/grub/grub_compat.j212
1 files changed, 8 insertions, 4 deletions
diff --git a/data/templates/grub/grub_compat.j2 b/data/templates/grub/grub_compat.j2
index 887d5d0bd..d1085eec8 100644
--- a/data/templates/grub/grub_compat.j2
+++ b/data/templates/grub/grub_compat.j2
@@ -22,13 +22,13 @@
{%- endmacro %}
{% macro console_opts(type) -%}
{% if type == 'tty' -%}
- console=ttyS0,115200 console=tty0
+ console=ttyS0,{{ console_speed }} console=tty0
{%- elif type == 'ttyS' -%}
- console=tty0 console=ttyS0,115200
+ console=tty0 console=ttyS0,{{ console_speed }}
{%- elif type == 'ttyUSB' -%}
console=tty0 console=ttyUSB0,115200
{%- else -%}
- console=tty0 console=ttyS0,115200
+ console=tty0 console=ttyS0,{{ console_speed }}
{%- endif %}
{%- endmacro %}
{% macro passwd_opts(mode) -%}
@@ -39,9 +39,13 @@
set default={{ default }}
set timeout={{ timeout }}
{% if console_type == 'ttyS' %}
+{% if console_num == '0' %}
+serial --unit=0 --speed={{ console_speed }}
+{% else %}
serial --unit={{ console_num }} --speed=115200
+{% endif %}
{% else %}
-serial --unit=0 --speed=115200
+serial --unit=0 --speed={{ console_speed }}
{% endif %}
terminal_output --append serial
terminal_input serial console