File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -88,15 +88,12 @@ config_syncd_mlnx()
88
88
89
89
[ -e /dev/sxdevs/sxcdev ] || ( mkdir -p /dev/sxdevs && mknod /dev/sxdevs/sxcdev c 231 193 )
90
90
91
- # Read MAC address and align the last 6 bits.
92
- MAC_ADDRESS=$( sonic-cfggen -d -v DEVICE_METADATA.localhost.mac)
93
- last_byte=$( python -c " print '$MAC_ADDRESS '[-2:]" )
94
- aligned_last_byte=$( python -c " print format(int(int('$last_byte ', 16) & 0b11000000), '02x')" ) # put mask and take away the 0x prefix
95
- ALIGNED_MAC_ADDRESS=$( python -c " print '$MAC_ADDRESS '[:-2] + '$aligned_last_byte '" ) # put aligned byte into the end of MAC
91
+ # Read MAC address
92
+ MAC_ADDRESS=" $( sonic-cfggen -d -v DEVICE_METADATA.localhost.mac) "
96
93
97
94
# Write MAC address into /tmp/profile file.
98
95
cat $HWSKU_DIR /sai.profile > /tmp/sai.profile
99
- echo " DEVICE_MAC_ADDRESS=$ALIGNED_MAC_ADDRESS " >> /tmp/sai.profile
96
+ echo " DEVICE_MAC_ADDRESS=$MAC_ADDRESS " >> /tmp/sai.profile
100
97
echo " SAI_WARM_BOOT_WRITE_FILE=/var/warmboot/" >> /tmp/sai.profile
101
98
}
102
99
You can’t perform that action at this time.
0 commit comments