forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cherry-pick][SAIServer]Upgrade SAI server init script (sonic-net#13175…
…) (sonic-net#13226) Why I did it why In order to apply different config across different platform, and use the code with a unified format, reuse syncd init script to init saiserver. How I did it how Reuse syncd init script How to verify it Test Test in DUT s6000 and dx010 with sonic 202205
- Loading branch information
1 parent
3fc76fd
commit 33bf592
Showing
5 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
platform/broadcom/docker-saiserver-brcm/saiserver_start.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters