sonic-buildimage/platform/broadcom/docker-syncd-brcm/start.sh

20 lines
480 B
Bash
Executable File

#!/usr/bin/env bash
HWSKU_DIR=/usr/share/sonic/hwsku
SYNCD_SOCKET_FILE=/var/run/sswsyncd/sswsyncd.socket
# Remove stale files if they exist
rm -f ${SYNCD_SOCKET_FILE}
mkdir -p /etc/sai.d/
# Create/Copy the sai.profile to /etc/sai.d/sai.profile
if [ -f $HWSKU_DIR/sai.profile.j2 ]; then
sonic-cfggen -d -t $HWSKU_DIR/sai.profile.j2 > /etc/sai.d/sai.profile
else
if [ -f $HWSKU_DIR/sai.profile ]; then
cp $HWSKU_DIR/sai.profile /etc/sai.d/sai.profile
fi
fi