2017-05-08 17:43:31 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-07-25 02:05:27 -05:00
|
|
|
# Export platform information. Required to be able to write
|
|
|
|
# vendor specific code.
|
2017-10-25 19:57:28 -05:00
|
|
|
export platform=`sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type`
|
2017-05-08 17:43:31 -05:00
|
|
|
|
|
|
|
MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'`
|
|
|
|
|
2017-05-26 19:56:29 -05:00
|
|
|
# Create a folder for SsWW record files
|
|
|
|
mkdir -p /var/log/swss
|
|
|
|
ORCHAGENT_ARGS="-d /var/log/swss "
|
2017-05-08 17:43:31 -05:00
|
|
|
|
2017-06-04 03:35:47 -05:00
|
|
|
# Set orchagent pop batch size to 8192
|
|
|
|
ORCHAGENT_ARGS+="-b 8192 "
|
|
|
|
|
2017-06-03 15:49:33 -05:00
|
|
|
# Add platform specific arguments if necessary
|
2017-10-25 19:57:28 -05:00
|
|
|
if [ "$platform" == "broadcom" ]; then
|
2017-05-08 17:43:31 -05:00
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
2017-10-25 19:57:28 -05:00
|
|
|
elif [ "$platform" == "cavium" ]; then
|
2017-05-24 13:59:01 -05:00
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
2017-12-22 12:04:29 -06:00
|
|
|
elif [ "$platform" == "nephos" ]; then
|
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
2017-05-08 17:43:31 -05:00
|
|
|
fi
|
|
|
|
|
2017-05-11 13:18:10 -05:00
|
|
|
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
|