diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-06-13 10:31:31 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-06-13 09:20:08 +0000 |
commit | a95d3dd5c43e6ada07db3f86ed2082264912813b (patch) | |
tree | 6b8d6d5a83cf2f202f794202bbac9b457d378994 /src/migration-scripts | |
parent | 8a98235b5d7f19a0f90cbd536097b3aef0ea29d7 (diff) | |
download | vyos-1x-a95d3dd5c43e6ada07db3f86ed2082264912813b.tar.gz vyos-1x-a95d3dd5c43e6ada07db3f86ed2082264912813b.zip |
wwan: T3620: fix backup route metric in migration script
(cherry picked from commit d20dd7a0e6af08a80c7c911e7b151f28e4666173)
Diffstat (limited to 'src/migration-scripts')
-rwxr-xr-x | src/migration-scripts/interfaces/18-to-19 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/migration-scripts/interfaces/18-to-19 b/src/migration-scripts/interfaces/18-to-19 index 03b990afb..76a578c2f 100755 --- a/src/migration-scripts/interfaces/18-to-19 +++ b/src/migration-scripts/interfaces/18-to-19 @@ -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') |