[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 <rpennadamram@marvell.com>
This commit is contained in:
parent
a3e144b16d
commit
2e7e7814cc
@ -448,7 +448,7 @@ def get_system_mac(namespace=None):
|
|||||||
machine_vars = get_machine_info()
|
machine_vars = get_machine_info()
|
||||||
if machine_vars is not None and machine_key in machine_vars:
|
if machine_vars is not None and machine_key in machine_vars:
|
||||||
hwsku = machine_vars[machine_key]
|
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:
|
else:
|
||||||
profile_cmd = "false"
|
profile_cmd = "false"
|
||||||
hw_mac_entry_cmds = ["sudo decode-syseeprom -m", profile_cmd, "ip link show eth0 | grep ether | awk '{print $2}'"]
|
hw_mac_entry_cmds = ["sudo decode-syseeprom -m", profile_cmd, "ip link show eth0 | grep ether | awk '{print $2}'"]
|
||||||
|
Reference in New Issue
Block a user