summaryrefslogtreecommitdiff
path: root/src/migration-scripts/system/28-to-29
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-01-22 20:52:52 +0100
committerChristian Breunig <christian@breunig.cc>2025-02-03 07:16:35 +0100
commit211bc4a767564d1eb28b431e1529eb719bb721a9 (patch)
treedb6a7c99185d46c28ad9010691f176ef1cf1233c /src/migration-scripts/system/28-to-29
parentb9c43b19acb6f649bb6f64c75ab63df768e360c9 (diff)
downloadvyos-1x-211bc4a767564d1eb28b431e1529eb719bb721a9.tar.gz
vyos-1x-211bc4a767564d1eb28b431e1529eb719bb721a9.zip
syslog: T6989: rename "global" to "local"
The previously "global" options actually were only relevant for the local logging to /var/log/messages.
Diffstat (limited to 'src/migration-scripts/system/28-to-29')
-rw-r--r--src/migration-scripts/system/28-to-2910
1 files changed, 8 insertions, 2 deletions
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'])