From 4f8e30dec96c906ca32b1ab9b48ff70fc3564a61 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 22 Feb 2020 09:52:37 +0100 Subject: pppoe: T1318: proper delete old interfaces in migrator --- src/migration-scripts/interfaces/4-to-5 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/migration-scripts/interfaces/4-to-5') diff --git a/src/migration-scripts/interfaces/4-to-5 b/src/migration-scripts/interfaces/4-to-5 index 15d841e89..2db9958d3 100755 --- a/src/migration-scripts/interfaces/4-to-5 +++ b/src/migration-scripts/interfaces/4-to-5 @@ -55,9 +55,9 @@ def migrate_dialer(config, tree, intf): if config.exists(ipv6_slaac): config.set(new_base + ['ipv6', 'address', 'autoconf']) - # Delete old PPPoE interface - config.delete(tree + [pppoe]) - + # Firewall migrieren + # QoS migrieren + # Quagga migrieren if __name__ == '__main__': @@ -84,6 +84,9 @@ if __name__ == '__main__': for dialer in config.list_nodes(pppoe_if): migrate_dialer(config, pppoe_if, interface) + # Delete old PPPoE interface + config.delete(pppoe_if) + # also migrate VLANs if not config.exists(['interfaces', link_type, interface, 'vif']): continue @@ -95,6 +98,9 @@ if __name__ == '__main__': intf = "{}.{}".format(interface, vlan) migrate_dialer(config, pppoe_if, intf) + # Delete old PPPoE interface + config.delete(pppoe_if) + try: with open(file_name, 'w') as f: f.write(config.to_string()) -- cgit v1.2.3