summaryrefslogtreecommitdiff
path: root/src/migration-scripts/ipsec/5-to-6
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-07-17 07:26:05 +0200
committerChristian Poessinger <christian@poessinger.com>2021-07-17 07:30:54 +0200
commit227391443df088f186f1719ae470ebb35d2ff706 (patch)
tree40829134643013fb96fd509c1cf9bdc722629bc9 /src/migration-scripts/ipsec/5-to-6
parent6a8080e1c0a7254ffb7046d543b9bff5618ff136 (diff)
downloadvyos-1x-227391443df088f186f1719ae470ebb35d2ff706.tar.gz
vyos-1x-227391443df088f186f1719ae470ebb35d2ff706.zip
ipsec: T2816: migrate "ipsec interfaces" to "interface"
Diffstat (limited to 'src/migration-scripts/ipsec/5-to-6')
-rwxr-xr-xsrc/migration-scripts/ipsec/5-to-66
1 files changed, 6 insertions, 0 deletions
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())