From 5b693c3a71f55062528ba93e934f27c8f9d611cf Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 21 Nov 2020 09:21:13 +0100 Subject: ethernet: T3048: fix migrator to also support a plain config When VyOS boots the first time with the default configuration there it actually no "interface ethernet" node present in the config, thus we must exit the migrator. Without this change vyos.configtree.ConfigTreeError: Path [b'interfaces ethernet'] doesn't exist will be thrown. --- src/migration-scripts/interfaces/14-to-15 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/migration-scripts/interfaces/14-to-15 b/src/migration-scripts/interfaces/14-to-15 index b170f7e4d..5c25f8628 100755 --- a/src/migration-scripts/interfaces/14-to-15 +++ b/src/migration-scripts/interfaces/14-to-15 @@ -33,6 +33,10 @@ if __name__ == '__main__': config = ConfigTree(config_file) base = ['interfaces', 'ethernet'] + if not config.exists(base): + # Nothing to do + exit(0) + migrate = False for interface in config.list_nodes(base): smp_base = base + [interface, 'smp-affinity'] -- cgit v1.2.3