From 827cefbcbfa22b42c8f144a41d6a2d3825268755 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 1 May 2022 18:40:57 +0200 Subject: conserver: T4353: fix Jinja2 linting errors --- data/templates/conserver/conserver.conf.j2 | 37 +++++++++++++++++++++++++ data/templates/conserver/conserver.conf.tmpl | 37 ------------------------- data/templates/conserver/dropbear@.service.j2 | 4 +++ data/templates/conserver/dropbear@.service.tmpl | 4 --- 4 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 data/templates/conserver/conserver.conf.j2 delete mode 100644 data/templates/conserver/conserver.conf.tmpl create mode 100644 data/templates/conserver/dropbear@.service.j2 delete mode 100644 data/templates/conserver/dropbear@.service.tmpl (limited to 'data/templates') diff --git a/data/templates/conserver/conserver.conf.j2 b/data/templates/conserver/conserver.conf.j2 new file mode 100644 index 000000000..1823657d7 --- /dev/null +++ b/data/templates/conserver/conserver.conf.j2 @@ -0,0 +1,37 @@ +### Autogenerated by service_console-server.py ### + +# See https://www.conserver.com/docs/conserver.cf.man.html for additional options + +config * { + primaryport 3109; + daemonmode false; +} + +default * { + motd "VyOS Console Server"; + rw *; +} + +## +## list of consoles we serve +## +{% for key, value in device.items() %} +{# Depending on our USB serial console we could require a path adjustment #} +{% set path = '/dev' if key.startswith('ttyS') else '/dev/serial/by-bus' %} +console {{ key }} { + master localhost; + type device; + device {{ path }}/{{ key }}; + baud {{ value.speed }}; + parity {{ value.parity }}; + options {{ "!" if value.stop_bits == "1" }}cstopb; +} +{% endfor %} + +## +## list of clients we allow +## +access * { + trusted localhost; + allowed localhost; +} diff --git a/data/templates/conserver/conserver.conf.tmpl b/data/templates/conserver/conserver.conf.tmpl deleted file mode 100644 index 4e7b5d8d7..000000000 --- a/data/templates/conserver/conserver.conf.tmpl +++ /dev/null @@ -1,37 +0,0 @@ -### Autogenerated by service_console-server.py ### - -# See https://www.conserver.com/docs/conserver.cf.man.html for additional options - -config * { - primaryport 3109; - daemonmode false; -} - -default * { - motd "VyOS Console Server"; - rw *; -} - -## -## list of consoles we serve -## -{% for key, value in device.items() %} -{# Depending on our USB serial console we could require a path adjustment #} -{% set path = '/dev' if key.startswith('ttyS') else '/dev/serial/by-bus' %} -console {{ key }} { - master localhost; - type device; - device {{ path }}/{{ key }}; - baud {{ value.speed }}; - parity {{ value.parity }}; - options {{ "!" if value.stop_bits == "1" }}cstopb; -} -{% endfor %} - -## -## list of clients we allow -## -access * { - trusted localhost; - allowed localhost; -} diff --git a/data/templates/conserver/dropbear@.service.j2 b/data/templates/conserver/dropbear@.service.j2 new file mode 100644 index 000000000..e355dab43 --- /dev/null +++ b/data/templates/conserver/dropbear@.service.j2 @@ -0,0 +1,4 @@ +[Service] +ExecStart= +ExecStart=/usr/sbin/dropbear -w -j -k -r /etc/dropbear/dropbear_rsa_host_key -b /etc/issue.net -c "/usr/bin/console {{ device }}" -P /run/conserver/dropbear.%I.pid -p %I +PIDFile=/run/conserver/dropbear.%I.pid diff --git a/data/templates/conserver/dropbear@.service.tmpl b/data/templates/conserver/dropbear@.service.tmpl deleted file mode 100644 index e355dab43..000000000 --- a/data/templates/conserver/dropbear@.service.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -[Service] -ExecStart= -ExecStart=/usr/sbin/dropbear -w -j -k -r /etc/dropbear/dropbear_rsa_host_key -b /etc/issue.net -c "/usr/bin/console {{ device }}" -P /run/conserver/dropbear.%I.pid -p %I -PIDFile=/run/conserver/dropbear.%I.pid -- cgit v1.2.3