From 2e7e7814cc71c353bef179c7f29bf00fcbac8714 Mon Sep 17 00:00:00 2001 From: Rajkumar-Marvell <54936542+rajkumar38@users.noreply.github.com> Date: Sat, 19 Jun 2021 00:02:30 +0530 Subject: [PATCH] [Marvell] Fix system MAC parsing logic for Marvell platform. (#7914) Fixed parsing logic in file "src/sonic-py-common/sonic_py_common/device_info.py" Signed-off-by: Rajkumar Pennadam Ramamoorthy --- src/sonic-py-common/sonic_py_common/device_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-py-common/sonic_py_common/device_info.py b/src/sonic-py-common/sonic_py_common/device_info.py index 2ab2051894..4d1df63522 100644 --- a/src/sonic-py-common/sonic_py_common/device_info.py +++ b/src/sonic-py-common/sonic_py_common/device_info.py @@ -448,7 +448,7 @@ def get_system_mac(namespace=None): machine_vars = get_machine_info() if machine_vars is not None and machine_key in machine_vars: hwsku = machine_vars[machine_key] - profile_cmd = 'cat' + HOST_DEVICE_PATH + '/' + platform + '/' + hwsku + '/profile.ini | grep switchMacAddress | cut -f2 -d=' + profile_cmd = 'cat ' + HOST_DEVICE_PATH + '/' + platform + '/' + hwsku + '/profile.ini | grep switchMacAddress | cut -f2 -d=' else: profile_cmd = "false" hw_mac_entry_cmds = ["sudo decode-syseeprom -m", profile_cmd, "ip link show eth0 | grep ether | awk '{print $2}'"]