From 3930be3b878643034fcfa99d9f428a0d38daec35 Mon Sep 17 00:00:00 2001 From: William Hughes Date: Mon, 26 Sep 2022 16:07:55 +1300 Subject: conserver: T4717: Support for setting a name for console-server devices This adds a new 'alias' property to the console-server device definition to allow users to connect to a console using a human-readable name rather than just the device name. For a configuration like: service { console-server { device ttyUSB0 { speed 115200 alias my-server } } } Users can connect either by doing `connect console ttyUSB0`, or `connect console my-server`. Names: * Must be unique * Are limited to 128 characters * Are optional - if not specified, only the `connect console ttyX` form can be used --- data/templates/conserver/conserver.conf.j2 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'data/templates/conserver') diff --git a/data/templates/conserver/conserver.conf.j2 b/data/templates/conserver/conserver.conf.j2 index 1823657d7..ffd29389d 100644 --- a/data/templates/conserver/conserver.conf.j2 +++ b/data/templates/conserver/conserver.conf.j2 @@ -25,6 +25,9 @@ console {{ key }} { baud {{ value.speed }}; parity {{ value.parity }}; options {{ "!" if value.stop_bits == "1" }}cstopb; +{% if value.alias is vyos_defined %} + aliases "{{ value.alias }}"; +{% endif %} } {% endfor %} -- cgit v1.2.3