From 227391443df088f186f1719ae470ebb35d2ff706 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 17 Jul 2021 07:26:05 +0200 Subject: ipsec: T2816: migrate "ipsec interfaces" to "interface" --- src/migration-scripts/ipsec/5-to-6 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/migration-scripts/ipsec') diff --git a/src/migration-scripts/ipsec/5-to-6 b/src/migration-scripts/ipsec/5-to-6 index ba5ce0fca..76ee9ecba 100755 --- a/src/migration-scripts/ipsec/5-to-6 +++ b/src/migration-scripts/ipsec/5-to-6 @@ -74,6 +74,12 @@ log_mode = log + ['log-modes'] if config.exists(log_mode): config.rename(log_mode, 'subsystem') +# Rename "ipsec-interfaces interface" to "interface" +base_interfaces = base + ['ipsec-interfaces', 'interface'] +if config.exists(base_interfaces): + config.copy(base_interfaces, base + ['interface']) + config.delete(base_interfaces) + try: with open(file_name, 'w') as f: f.write(config.to_string()) -- cgit v1.2.3