Skip to content

Commit

Permalink
[swss]: Update orchagent.sh script to use asic_type to add arguments (#…
Browse files Browse the repository at this point in the history
…667)

- Right now Broadcom and Cavium platforms need to set MAC address when
  starting orchagent daemon.
  • Loading branch information
Shuotian Cheng authored Jun 3, 2017
1 parent 8944ee6 commit c3aa513
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions dockers/docker-orchagent/orchagent.sh
Original file line number Diff line number Diff line change
@@ -1,40 +1,18 @@
#!/usr/bin/env bash

HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v minigraph_hwsku`
ASIC=`sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type`

MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'`

# Create a folder for SsWW record files
mkdir -p /var/log/swss
ORCHAGENT_ARGS="-d /var/log/swss "

if [ "$HWSKU" == "Force10-S6000" ]; then
# Add platform specific arguments if necessary
if [ "$ASIC" == "broadcom" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "Force10-S6000-Q32" ]; then
elif [ "$ASIC" == "cavium" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "Force10-S6100" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "Force10-Z9100" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "Arista-7050-QX32" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "Arista-7050-QX32S" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "Arista-7060-CX32S" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "AS7512" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "INGRASYS-S9100-C32" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "INGRASYS-S8900-54XC" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "INGRASYS-S8900-64XC" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$HWSKU" == "Facebook-W100-C32" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
else
echo "Unsupported HWSKU:$HWSKU. Exiting..." > /dev/stderr
exit 1
fi

exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
Expand Down

0 comments on commit c3aa513

Please sign in to comment.