This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/dockers/docker-orchagent/swssconfig.sh
Wenda Ni, Ph.D ef683848af [devices]: A7050 qx32 mmuconfig (#1463)
* Apply MMU config (buffers, qos) to Arista-7050-QX32

Signed-off-by: Wenda <wenni@microsoft.com>
2018-03-07 07:21:41 -08:00

54 lines
998 B
Bash
Executable File

#!/usr/bin/env bash
set -e
function fast_reboot {
case "$(cat /proc/cmdline)" in
*fast-reboot*)
if [[ -f /fdb.json ]];
then
swssconfig /fdb.json
rm -f /fdb.json
fi
if [[ -f /arp.json ]];
then
swssconfig /arp.json
rm -f /arp.json
fi
if [[ -f /default_routes.json ]];
then
swssconfig /default_routes.json
rm -f /default_routes.json
fi
;;
*)
;;
esac
}
# Wait until swss.sh in the host system create file swss:/ready
until [[ -e /ready ]]; do
sleep 0.1;
done
rm -f /ready
# Restore FDB and ARP table ASAP
fast_reboot
HWSKU=`sonic-cfggen -d -v "DEVICE_METADATA['localhost']['hwsku']"`
SWSSCONFIG_ARGS="00-copp.config.json ipinip.json ports.json switch.json "
if [ "$HWSKU" == "Force10-S6100" ]; then
SWSSCONFIG_ARGS+="th.64ports.buffers.json th.64ports.qos.json "
fi
for file in $SWSSCONFIG_ARGS; do
swssconfig /etc/swss/config.d/$file
sleep 1
done