summaryrefslogtreecommitdiff
path: root/src/migration-scripts/l2tp
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-10 19:43:38 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-11 11:25:13 +0200
commita533ca621567150732b58fc5176cd18b608f1f92 (patch)
tree08f8d935e5886330e9d37fccb6297faf0267345a /src/migration-scripts/l2tp
parent6a2e75dbe4003c6987c6932296e68c486ff7b380 (diff)
downloadvyos-1x-a533ca621567150732b58fc5176cd18b608f1f92.tar.gz
vyos-1x-a533ca621567150732b58fc5176cd18b608f1f92.zip
vpn: l2tp: T2264: combine WINS CLI syntax
There is no reason to distinguish between WINS servers in terms of priority. This is solely a task which can be done in the underlaying Python scripts.
Diffstat (limited to 'src/migration-scripts/l2tp')
-rwxr-xr-xsrc/migration-scripts/l2tp/2-to-311
1 files changed, 11 insertions, 0 deletions
diff --git a/src/migration-scripts/l2tp/2-to-3 b/src/migration-scripts/l2tp/2-to-3
index ebeb814c1..f1f9b67b5 100755
--- a/src/migration-scripts/l2tp/2-to-3
+++ b/src/migration-scripts/l2tp/2-to-3
@@ -56,6 +56,17 @@ else:
config.delete(dns_base)
+
+ # Migrate IPv4 WINS servers
+ wins_base = base + ['wins-servers']
+ if config.exists(wins_base):
+ for server in ['server-1', 'server-2']:
+ if config.exists(wins_base + [server]):
+ wins = config.return_value(wins_base + [server])
+ config.set(base + ['wins-server'], value=wins, replace=False)
+
+ config.delete(wins_base)
+
try:
with open(file_name, 'w') as f:
f.write(config.to_string())