summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-21 09:21:13 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-21 09:21:19 +0100
commit5b693c3a71f55062528ba93e934f27c8f9d611cf (patch)
treee7dd0bfb4468b408e780caefa1bbe03637e0fb13 /src
parent193323ba5d2f0318ceb81b3969c0181ba3125cf2 (diff)
downloadvyos-1x-5b693c3a71f55062528ba93e934f27c8f9d611cf.tar.gz
vyos-1x-5b693c3a71f55062528ba93e934f27c8f9d611cf.zip
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.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/migration-scripts/interfaces/14-to-154
1 files changed, 4 insertions, 0 deletions
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']