We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eef4a89 commit df529efCopy full SHA for df529ef
files/image_config/platform/rc.local
@@ -84,7 +84,7 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then
84
SYSTEM_MAC_ADDRESS=$(ip link show eth0 | grep ether | awk '{print $2}')
85
86
# Align last byte of MAC if necessary
87
- if [ "$SONIC_ASIC_TYPE" == "mellanox" -o "$SONIC_ASIC_TYPE" == "centec" ]; then
+ if [ "$SONIC_ASIC_TYPE" = "mellanox" ] || [ "$SONIC_ASIC_TYPE" = "centec" ]; then
88
last_byte=$(python -c "print '$SYSTEM_MAC_ADDRESS'[-2:]")
89
aligned_last_byte=$(python -c "print format(int(int('$last_byte', 16) & 0b11000000), '02x')") # put mask and take away the 0x prefix
90
SYSTEM_MAC_ADDRESS=$(python -c "print '$SYSTEM_MAC_ADDRESS'[:-2] + '$aligned_last_byte'") # put aligned byte into the end of MAC
0 commit comments