Fix file selection in onie_machine_get() for newer machine-build.conf location.

There are other locations for which also applies and should be cleaned up.
This commit is contained in:
Jeffrey Townsend
2019-08-21 22:28:36 +00:00
parent a1a806e8e1
commit 8ed833fb77

View File

@@ -257,7 +257,7 @@ class OnlPlatformBase(object):
mc = self.basedir_onl("etc/onie/machine.json")
if not os.path.exists(mc):
data = {}
mcconf = subprocess.check_output("""onie-shell -c "IFS=; . /etc/machine.conf; set | egrep ^onie_.*=" """, shell=True)
mcconf = subprocess.check_output("""onie-shell -c "IFS=; . /etc/machine*.conf; set | egrep ^onie_.*=" """, shell=True)
for entry in mcconf.split():
(k,e,v) = entry.partition('=')
if v and (v.startswith("'") or v.startswith('"')):
@@ -525,11 +525,11 @@ class OnlPlatformPortConfig_32x100(object):
class OnlPlatformPortConfig_64x100(object):
PORT_COUNT=64
PORT_CONFIG="64x100"
class OnlPlatformPortConfig_80x100(object):
PORT_COUNT=80
PORT_CONFIG="80x100"
class OnlPlatformPortConfig_128x100(object):
PORT_COUNT=128
PORT_CONFIG="128x100"
@@ -573,4 +573,3 @@ class OnlPlatformPortConfig_16x10_8x25_2x100(object):
class OnlPlatformPortConfig_46x10_6x100(object):
PORT_COUNT=52
PORT_CONFIG="46x10 + 6x100"