summaryrefslogtreecommitdiff
path: root/src/migration-scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-23 12:27:55 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-23 14:36:56 +0100
commit2fec7394434f8daace485e97a7287cc8233fa178 (patch)
treeea833ff35c5515a86ee30470a362c97722384b92 /src/migration-scripts
parentcf5b8ca0f6de111e792c3243c8e1adc8bdb998c6 (diff)
downloadvyos-1x-2fec7394434f8daace485e97a7287cc8233fa178.tar.gz
vyos-1x-2fec7394434f8daace485e97a7287cc8233fa178.zip
pppoe: T1318: declutter name-server CLI nodes
Instead of letting the user choose between auto and none where auto is default, it makes more sesne to just offer an option to disable the default behavior.
Diffstat (limited to 'src/migration-scripts')
-rwxr-xr-xsrc/migration-scripts/interfaces/4-to-59
1 files changed, 9 insertions, 0 deletions
diff --git a/src/migration-scripts/interfaces/4-to-5 b/src/migration-scripts/interfaces/4-to-5
index dd1e9a51e..2a42c60ff 100755
--- a/src/migration-scripts/interfaces/4-to-5
+++ b/src/migration-scripts/interfaces/4-to-5
@@ -19,6 +19,15 @@ def migrate_dialer(config, tree, intf):
# parts
config.copy(tree + [pppoe], pppoe_base)
+ # Instead of letting the user choose between auto and none
+ # where auto is default, it makes more sesne to just offer
+ # an option to disable the default behavior (declutter CLI)
+ if config.exists(pppoe_base + ['name-server']):
+ tmp = config.return_value(pppoe_base + ['name-server'])
+ if tmp == "none":
+ config.set(pppoe_base + ['no-peer-dns'])
+ config.delete(pppoe_base + ['name-server'])
+
# Migrate user-id and password nodes under an 'authentication'
# node
if config.exists(pppoe_base + ['user-id']):