sonic-buildimage/dockers/docker-orchagent/orchagent.sh

28 lines
816 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# Export platform information. Required to be able to write
# vendor specific code.
export platform=`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 "
# Set orchagent pop batch size to 8192
ORCHAGENT_ARGS+="-b 8192 "
# Add platform specific arguments if necessary
if [ "$platform" == "broadcom" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
elif [ "$platform" == "cavium" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
2018-03-13 21:06:21 -05:00
elif [ "$platform" == "nephos" ]; then
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
2017-11-07 13:12:40 -06:00
elif [ "$platform" == "barefoot" ]; then
2017-11-02 19:11:14 -05:00
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
fi
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}