diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/system_host-name.py | 2 | ||||
| -rwxr-xr-x | src/conf_mode/system_syslog.py | 2 | ||||
| -rwxr-xr-x | src/init/vyos-router | 8 | 
3 files changed, 10 insertions, 2 deletions
| diff --git a/src/conf_mode/system_host-name.py b/src/conf_mode/system_host-name.py index fef034d1c..de4accda2 100755 --- a/src/conf_mode/system_host-name.py +++ b/src/conf_mode/system_host-name.py @@ -175,7 +175,7 @@ def apply(config):      # Restart services that use the hostname      if hostname_new != hostname_old: -        tmp = systemd_services['rsyslog'] +        tmp = systemd_services['syslog']          call(f'systemctl restart {tmp}')      # If SNMP is running, restart it too diff --git a/src/conf_mode/system_syslog.py b/src/conf_mode/system_syslog.py index 414bd4b6b..bdab09f3c 100755 --- a/src/conf_mode/system_syslog.py +++ b/src/conf_mode/system_syslog.py @@ -35,7 +35,7 @@ rsyslog_conf = '/run/rsyslog/rsyslog.conf'  logrotate_conf = '/etc/logrotate.d/vyos-rsyslog'  systemd_socket = 'syslog.socket' -systemd_service = systemd_services['rsyslog'] +systemd_service = systemd_services['syslog']  def get_config(config=None):      if config: diff --git a/src/init/vyos-router b/src/init/vyos-router index 081adf214..8584234b3 100755 --- a/src/init/vyos-router +++ b/src/init/vyos-router @@ -460,6 +460,14 @@ start ()      nfct helper add tns inet6 tcp      nft --file /usr/share/vyos/vyos-firewall-init.conf || log_failure_msg "could not initiate firewall rules" +    # Ensure rsyslog is the default syslog daemon +    SYSTEMD_SYSLOG="/etc/systemd/system/syslog.service" +    SYSTEMD_RSYSLOG="/lib/systemd/system/rsyslog.service" +    if [ ! -L ${SYSTEMD_SYSLOG} ] || [ "$(readlink -f ${SYSTEMD_SYSLOG})" != "${SYSTEMD_RSYSLOG}" ]; then +        ln -sf ${SYSTEMD_RSYSLOG} ${SYSTEMD_SYSLOG} +        systemctl daemon-reload +    fi +      # As VyOS does not execute commands that are not present in the CLI we call      # the script by hand to have a single source for the login banner and MOTD      ${vyos_conf_scripts_dir}/system_syslog.py || log_failure_msg "could not reset syslog" | 
