mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-11-02 11:07:46 +00:00
[sonic-config-engine][marvell] read mac address fix (#4649)
Signed-off-by: Sabareesh Kumar Anandan <sanandan@marvell.com>
This commit is contained in:
committed by
GitHub
parent
f532fb95a9
commit
17904969b6
@@ -161,7 +161,7 @@ def get_system_mac(namespace=None):
|
|||||||
# Try valid mac in eeprom, else fetch it from eth0
|
# Try valid mac in eeprom, else fetch it from eth0
|
||||||
platform = get_platform_info(get_machine_info())
|
platform = get_platform_info(get_machine_info())
|
||||||
hwsku = get_machine_info()['onie_machine']
|
hwsku = get_machine_info()['onie_machine']
|
||||||
profile_cmd = 'cat' + SONIC_DEVICE_PATH + '/' + platform +'/'+ hwsku +'/profile.ini | cut -f2 -d='
|
profile_cmd = 'cat' + SONIC_DEVICE_PATH + '/' + platform +'/'+ hwsku +'/profile.ini | grep switchMacAddress | cut -f2 -d='
|
||||||
hw_mac_entry_cmds = [ profile_cmd, "sudo decode-syseeprom -m", "ip link show eth0 | grep ether | awk '{print $2}'" ]
|
hw_mac_entry_cmds = [ profile_cmd, "sudo decode-syseeprom -m", "ip link show eth0 | grep ether | awk '{print $2}'" ]
|
||||||
else:
|
else:
|
||||||
mac_address_cmd = "cat /sys/class/net/eth0/address"
|
mac_address_cmd = "cat /sys/class/net/eth0/address"
|
||||||
|
|||||||
Reference in New Issue
Block a user