summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-13 10:31:31 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-13 10:31:31 +0200
commitd20dd7a0e6af08a80c7c911e7b151f28e4666173 (patch)
treeeb60cf9b828dd5972702d77b3aca4a718e5922a5 /src
parentc2a1c071e7d0a9ca754d7f5016eed7db188b3d1a (diff)
downloadvyos-1x-d20dd7a0e6af08a80c7c911e7b151f28e4666173.tar.gz
vyos-1x-d20dd7a0e6af08a80c7c911e7b151f28e4666173.zip
wwan: T3620: fix backup route metric in migration script
Diffstat (limited to 'src')
-rwxr-xr-xsrc/migration-scripts/interfaces/21-to-228
1 files changed, 8 insertions, 0 deletions
diff --git a/src/migration-scripts/interfaces/21-to-22 b/src/migration-scripts/interfaces/21-to-22
index 03b990afb..76a578c2f 100755
--- a/src/migration-scripts/interfaces/21-to-22
+++ b/src/migration-scripts/interfaces/21-to-22
@@ -68,6 +68,14 @@ if __name__ == '__main__':
else:
config.set(['system', 'name-servers-dhcp'], value=interface, replace=False)
+ # Backup distance is now handled by DHCP option "default-route-distance"
+ distance = dns = new_base + [interface, 'backup', 'distance']
+ old_default_distance = '10'
+ if config.exists(distance):
+ old_default_distance = config.return_value(distance)
+ config.delete(distance)
+ config.set(new_base + [interface, 'dhcp-options', 'default-route-distance'], value=old_default_distance)
+
# the new wwan interface use regular IP addressing
config.set(new_base + [interface, 'address'], value='dhcp')