From 211bc4a767564d1eb28b431e1529eb719bb721a9 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 22 Jan 2025 20:52:52 +0100 Subject: syslog: T6989: rename "global" to "local" The previously "global" options actually were only relevant for the local logging to /var/log/messages. --- src/migration-scripts/system/28-to-29 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/migration-scripts/system/28-to-29') 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']) -- cgit v1.2.3