sonic-buildimage/platform/mellanox/docker-saiserver-mlnx/saiserver_start.sh
Richard.Yu cf5ca9d27c
[SAI-PTF][mlnx]Enable saiserver test container on mlnx platforms (#13311)
* Why I did it
Enable Test sai api on bfn container with a lightweight container(saiserver).
[SAI-PTF][mlnx]Enable saiserver test container on mlnx container

How I did it
enable saiserver container on mlnx platform.

add docker-saiserver-mlnx.mk for building saiserver container
in platform/barefoot/docker-saiserver-mlnx, add necessary files that needs in saiserver container
How to verify it

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
2023-02-16 15:42:12 -08:00

33 lines
870 B
Bash

#!/usr/bin/env bash
# Copy from src/sonic-sairedis/syncd/scripts/syncd_start.sh
# Re-use the structure for syncd setup
# Use it to start saiserver
# Script to start syncd using supervisord
#
# Source the file that holds common code for systemd and supervisord
. /usr/bin/syncd_init_common.sh
get_saiserver_param()
{
IFS=' ' read -r -a array <<< "$CMD_ARGS"
for index in "${!array[@]}"
do
#echo "$index ${array[index]}"
if [[ "${array[index]}" == *"-p"* ]]; then
SAI_PROFILE="${array[index+1]}"
fi
if [[ "${array[index]}" == *"-m"* ]]; then
PORT_CONFIG="${array[index+1]}"
fi
done
}
ENABLE_SAITHRIFT=1
config_syncd
get_saiserver_param
echo exec /usr/sbin/saiserver -p ${SAI_PROFILE} -f ${PORT_CONFIG}
exec /usr/sbin/saiserver -p ${SAI_PROFILE} -f ${PORT_CONFIG}
#exec ${CMD} ${CMD_ARGS}