From 067ddcf27ac1fbc33cee710ae66a85b0368a26d9 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 18 Jun 2020 21:44:17 +0200 Subject: console-server: T2490: log to journald --- data/templates/conserver/conserver.conf.tmpl | 7 +++---- op-mode-definitions/show-log.xml | 6 ++++++ src/conf_mode/service_serial-proxy.py | 2 +- src/etc/systemd/system/conserver-server.service.d/override.conf | 6 ++++++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/data/templates/conserver/conserver.conf.tmpl b/data/templates/conserver/conserver.conf.tmpl index ec0eca5f0..329a9b4ae 100644 --- a/data/templates/conserver/conserver.conf.tmpl +++ b/data/templates/conserver/conserver.conf.tmpl @@ -3,13 +3,12 @@ # See https://www.conserver.com/docs/conserver.cf.man.html for additional options config * { + primaryport 3109; + daemonmode false; } default * { - motd "VyOS Console Server" - # The character '&' in logfile names are substituted with the console name. - logfile /var/log/conserver/&.log; - timestamp "30m"; + motd "VyOS Console Server"; rw *; } diff --git a/op-mode-definitions/show-log.xml b/op-mode-definitions/show-log.xml index 0c4da647b..827bee4c7 100644 --- a/op-mode-definitions/show-log.xml +++ b/op-mode-definitions/show-log.xml @@ -32,6 +32,12 @@ cat $(printf "%s\n" /var/log/messages* | sort -nr ) | grep -e conntrackd + + + Show log for serial console server + + /usr/bin/journalctl -u conserver-server.service + Show log for Dynamic Host Control Protocol (DHCP) diff --git a/src/conf_mode/service_serial-proxy.py b/src/conf_mode/service_serial-proxy.py index 85fcfed08..0dd1cfc6d 100755 --- a/src/conf_mode/service_serial-proxy.py +++ b/src/conf_mode/service_serial-proxy.py @@ -24,7 +24,7 @@ from vyos.template import render from vyos.util import call from vyos import ConfigError -config_file = r'/etc/conserver/conserver.cf' +config_file = r'/run/conserver/conserver.cf' # Default values are necessary until the implementation of T2588 is completed default_values = { diff --git a/src/etc/systemd/system/conserver-server.service.d/override.conf b/src/etc/systemd/system/conserver-server.service.d/override.conf index 1be5cec81..5301b38ce 100644 --- a/src/etc/systemd/system/conserver-server.service.d/override.conf +++ b/src/etc/systemd/system/conserver-server.service.d/override.conf @@ -1,3 +1,9 @@ [Unit] After= After=vyos-router.service + +[Service] +Type=simple +ExecStart= +ExecStart=/usr/sbin/conserver -C /run/conserver/conserver.cf + -- cgit v1.2.3