From d20dd7a0e6af08a80c7c911e7b151f28e4666173 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 13 Jun 2021 10:31:31 +0200 Subject: wwan: T3620: fix backup route metric in migration script --- src/migration-scripts/interfaces/21-to-22 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/migration-scripts/interfaces/21-to-22') 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') -- cgit v1.2.3