2017-10-24 00:01:42 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-03-06 18:27:41 -06:00
|
|
|
if [[ -z "$fake_platform" ]]; then
|
|
|
|
export platform=vs
|
|
|
|
else
|
|
|
|
export platform=$fake_platform
|
|
|
|
fi
|
2018-07-13 02:07:30 -05:00
|
|
|
|
2020-02-20 21:16:14 -06:00
|
|
|
MAC_ADDRESS=$(sonic-cfggen -d -v 'DEVICE_METADATA.localhost.mac')
|
|
|
|
if [ "$MAC_ADDRESS" == "None" ] || [ -z "$MAC_ADDRESS" ]; then
|
|
|
|
MAC_ADDRESS=$(ip link show eth0 | grep ether | awk '{print $2}')
|
|
|
|
logger "Mac address not found in Device Metadata, Falling back to eth0"
|
|
|
|
fi
|
2017-10-24 00:01:42 -05:00
|
|
|
|
2018-07-13 02:07:30 -05:00
|
|
|
# Create a folder for SwSS record files
|
2017-10-24 00:01:42 -05:00
|
|
|
mkdir -p /var/log/swss
|
|
|
|
ORCHAGENT_ARGS="-d /var/log/swss "
|
|
|
|
|
|
|
|
# Set orchagent pop batch size to 8192
|
|
|
|
ORCHAGENT_ARGS+="-b 8192 "
|
|
|
|
|
|
|
|
# Set mac address
|
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
|
|
|
|
|
|
|
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
|