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.
|
|
|
|
export platform=`sonic-cfggen -m /etc/sonic/minigraph.xml -v onie_switch_asic`
|
|
|
|
|
2017-06-03 15:49:33 -05:00
|
|
|
ASIC=`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
|
|
|
|
if [ "$ASIC" == "broadcom" ]; then
|
2017-05-08 17:43:31 -05:00
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
2017-06-03 15:49:33 -05:00
|
|
|
elif [ "$ASIC" == "cavium" ]; then
|
2017-05-24 13:59:01 -05:00
|
|
|
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}
|