summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system_syslog.py4
-rw-r--r--src/migration-scripts/system/28-to-2910
2 files changed, 10 insertions, 4 deletions
diff --git a/src/conf_mode/system_syslog.py b/src/conf_mode/system_syslog.py
index 6f6546fd1..f27c27e0b 100755
--- a/src/conf_mode/system_syslog.py
+++ b/src/conf_mode/system_syslog.py
@@ -50,8 +50,8 @@ def get_config(config=None):
if tmp: syslog.update({'restart_required': {}})
syslog = conf.merge_defaults(syslog, recursive=True)
- if syslog.from_defaults(['global']):
- del syslog['global']
+ if syslog.from_defaults(['local']):
+ del syslog['local']
if 'preserve_fqdn' in syslog:
if conf.exists(['system', 'host-name']):
diff --git a/src/migration-scripts/system/28-to-29 b/src/migration-scripts/system/28-to-29
index 9716e9e90..2ccd4b9c0 100644
--- a/src/migration-scripts/system/28-to-29
+++ b/src/migration-scripts/system/28-to-29
@@ -37,8 +37,9 @@ def migrate(config: ConfigTree) -> None:
# Move "global preserve-fqdn" one CLI level up, as it relates to all
# logging targets (console, global and remote)
- if config.exists(base + ['global', 'preserve-fqdn']):
- config.delete(base + ['global', 'preserve-fqdn'])
+ preserve_fqdn_base = base + ['global', 'preserve-fqdn']
+ if config.exists(preserve_fqdn_base):
+ config.delete(preserve_fqdn_base)
config.set(base + ['preserve-fqdn'])
# Move "global marker" one CLI level up, as it relates to all
@@ -48,6 +49,11 @@ def migrate(config: ConfigTree) -> None:
config.copy(marker_base, base + ['marker'])
config.delete(marker_base)
+ # Rename "global" -> "local" as this describes what is logged locally
+ # on the router to a file on the filesystem
+ if config.exists(base + ['global']):
+ config.rename(base + ['global'], 'local')
+
# Rename host x.x.x.x -> remote x.x.x.x
if config.exists(base + ['host']):
config.set(base + ['remote'])