summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-18 22:38:50 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-18 22:38:50 +0200
commitc08ea8340ec5138b5f7a696eae09ff77a734350e (patch)
tree29b154074be0df9fce9bcd2625dce1867d77790a
parent6da4b10139787dc1096c7a0d4b0cae5120caf870 (diff)
downloadvyos-1x-c08ea8340ec5138b5f7a696eae09ff77a734350e.tar.gz
vyos-1x-c08ea8340ec5138b5f7a696eae09ff77a734350e.zip
{pppoe,ipoe}-server: rename RADIUS key
-rwxr-xr-xsrc/migration-scripts/ipoe-server/0-to-14
-rwxr-xr-xsrc/migration-scripts/pppoe-server/2-to-34
2 files changed, 8 insertions, 0 deletions
diff --git a/src/migration-scripts/ipoe-server/0-to-1 b/src/migration-scripts/ipoe-server/0-to-1
index 1ae1ad61c..0a8b4a5c7 100755
--- a/src/migration-scripts/ipoe-server/0-to-1
+++ b/src/migration-scripts/ipoe-server/0-to-1
@@ -75,6 +75,10 @@ else:
old_base = radius_server + [server]
config.copy(old_base, new_base + [server])
+ # migrate key
+ if config.exists(new_base + [server, 'secret']):
+ config.rename(new_base + [server, 'secret'], 'key')
+
# remove old req-limit node
if config.exists(new_base + [server, 'req-limit']):
config.delete(new_base + [server, 'req-limit'])
diff --git a/src/migration-scripts/pppoe-server/2-to-3 b/src/migration-scripts/pppoe-server/2-to-3
index d5d88d373..28b1e33e4 100755
--- a/src/migration-scripts/pppoe-server/2-to-3
+++ b/src/migration-scripts/pppoe-server/2-to-3
@@ -84,6 +84,10 @@ else:
old_base = radius_server + [server]
config.copy(old_base, new_base + [server])
+ # migrate key
+ if config.exists(new_base + [server, 'secret']):
+ config.rename(new_base + [server, 'secret'], 'key')
+
# remove old req-limit node
if config.exists(new_base + [server, 'req-limit']):
config.delete(new_base + [server, 'req-limit'])