summaryrefslogtreecommitdiff
path: root/src/conf_mode/syslog.py
diff options
context:
space:
mode:
authorhagbard-01 <39653662+hagbard-01@users.noreply.github.com>2018-09-08 12:33:44 -0700
committerGitHub <noreply@github.com>2018-09-08 12:33:44 -0700
commitc0f32e28eb972697aa11a4cf9912f457c51f0c10 (patch)
tree663cc8c6bf43cf1a7cdc5df67c4406d65bc7e297 /src/conf_mode/syslog.py
parent37bc4c58de2744f9c1b814955f8a8f7057b9f45b (diff)
parent3dfa3e6736d586e73974a15e29c1fc06f50e673e (diff)
downloadvyos-1x-c0f32e28eb972697aa11a4cf9912f457c51f0c10.tar.gz
vyos-1x-c0f32e28eb972697aa11a4cf9912f457c51f0c10.zip
Merge pull request #50 from hagbard-01/current
T836: syslog messages split accross multiple files
Diffstat (limited to 'src/conf_mode/syslog.py')
-rwxr-xr-xsrc/conf_mode/syslog.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/conf_mode/syslog.py b/src/conf_mode/syslog.py
index 5dfc6f390..f652cf3d0 100755
--- a/src/conf_mode/syslog.py
+++ b/src/conf_mode/syslog.py
@@ -93,7 +93,7 @@ def get_config():
config_data['files'].update(
{
'global' : {
- 'log-file' : '/var/log/vyos-rsyslog',
+ 'log-file' : '/var/log/messages',
'max-size' : 262144,
'action-on-max-size' : '/usr/sbin/logrotate /etc/logrotate.d/vyos-rsyslog',
'selectors' : '*.notice;local7.debug',
@@ -229,6 +229,18 @@ def generate(c):
f.write(config_text)
def verify(c):
+ #
+ # /etc/rsyslog.conf is generated somewhere and copied over the original (exists in /opt/vyatta/etc/rsyslog.conf)
+ # it interferes with the global logging, to make sure we are using a single base, template is enforced here
+ #
+
+ if not os.path.islink('/etc/rsyslog.conf'):
+ os.remove('/etc/rsyslog.conf')
+ os.symlink('/usr/share/vyos/templates/rsyslog/rsyslog.conf', '/etc/rsyslog.conf')
+
+ # /var/log/vyos-rsyslog were the old files, we may want to clean those up, but currently there
+ # is a chance that someone still needs it, so I don't automatically remove them
+
if c == None:
return None