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 --- src/completion/list_consoles.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 src/completion/list_consoles.sh (limited to 'src/completion') diff --git a/src/completion/list_consoles.sh b/src/completion/list_consoles.sh new file mode 100755 index 000000000..52278c4cb --- /dev/null +++ b/src/completion/list_consoles.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +# For lines like `aliases "foo";`, regex matches everything between the quotes +grep -oP '(?<=aliases ").+(?=";)' /run/conserver/conserver.cf \ No newline at end of file -- cgit v1.2.3