2017-05-08 17:43:31 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v minigraph_hwsku`
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
if [ "$HWSKU" == "Force10-S6000" ]; then
|
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
2017-05-24 13:59:01 -05:00
|
|
|
elif [ "$HWSKU" == "Force10-S6000-Q32" ]; then
|
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
2017-05-08 17:43:31 -05:00
|
|
|
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"
|
2017-05-16 10:07:47 -05:00
|
|
|
elif [ "$HWSKU" == "Arista-7050-QX32S" ]; then
|
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
2017-05-08 17:43:31 -05:00
|
|
|
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"
|
2017-05-18 13:05:49 -05:00
|
|
|
elif [ "$HWSKU" == "INGRASYS-S8900-54XC" ]; then
|
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
|
|
|
elif [ "$HWSKU" == "INGRASYS-S8900-64XC" ]; then
|
|
|
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
2017-05-31 12:57:31 -05:00
|
|
|
else
|
|
|
|
echo "Unsupported HWSKU:$HWSKU. Exiting..." > /dev/stderr
|
|
|
|
exit 1
|
2017-05-08 17:43:31 -05:00
|
|
|
fi
|
|
|
|
|
2017-05-11 13:18:10 -05:00
|
|
|
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
|
2017-05-08 17:43:31 -05:00
|
|
|
|