diff options
author | William Hughes <will@willhughes.name> | 2022-09-26 16:07:55 +1300 |
---|---|---|
committer | William Hughes <will@willhughes.name> | 2022-09-28 17:33:07 +1300 |
commit | 3930be3b878643034fcfa99d9f428a0d38daec35 (patch) | |
tree | ebd1d94d11ce94cf7bd76eab5539db04dc96c136 /data/templates | |
parent | 53bd9fe11e449c66656fef9cb72084d5d0800a75 (diff) | |
download | vyos-1x-3930be3b878643034fcfa99d9f428a0d38daec35.tar.gz vyos-1x-3930be3b878643034fcfa99d9f428a0d38daec35.zip |
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
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/conserver/conserver.conf.j2 | 3 |
1 files changed, 3 insertions, 0 deletions
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 %} |