summaryrefslogtreecommitdiff
path: root/src/migration-scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-23 12:26:34 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-23 14:36:56 +0100
commit3d0162557f9c2217d4a925e6c893863b1af55e58 (patch)
treeb204c47d4450161654a6d75e6f203097ed82e54f /src/migration-scripts
parent07273632fcf59d04be988f2c43fe53e7bec8d46a (diff)
downloadvyos-1x-3d0162557f9c2217d4a925e6c893863b1af55e58.tar.gz
vyos-1x-3d0162557f9c2217d4a925e6c893863b1af55e58.zip
pppoe: T1318: migrate user-id and password nodes under an authentication node
Diffstat (limited to 'src/migration-scripts')
-rwxr-xr-xsrc/migration-scripts/interfaces/4-to-511
1 files changed, 11 insertions, 0 deletions
diff --git a/src/migration-scripts/interfaces/4-to-5 b/src/migration-scripts/interfaces/4-to-5
index 0683861f2..19e0352c8 100755
--- a/src/migration-scripts/interfaces/4-to-5
+++ b/src/migration-scripts/interfaces/4-to-5
@@ -19,6 +19,17 @@ def migrate_dialer(config, tree, intf):
# parts
config.copy(tree + [pppoe], pppoe_base)
+ # Migrate user-id and password nodes under an 'authentication'
+ # node
+ if config.exists(pppoe_base + ['user-id']):
+ user = config.return_value(pppoe_base + ['user-id'])
+ config.set(pppoe_base + ['authentication', 'user'], value=user)
+ config.delete(pppoe_base + ['user-id'])
+
+ if config.exists(pppoe_base + ['password']):
+ pwd = config.return_value(pppoe_base + ['password'])
+ config.set(pppoe_base + ['authentication', 'password'], value=pwd)
+ config.delete(pppoe_base + ['password'])
# remove enable-ipv6 node and rather place it under ipv6 node
if config.exists(pppoe_base + ['enable-ipv6']):