Skip to content

Commit 6a9bfaf

Browse files
qiluo-msftlguohan
authored andcommitted
[syncd] Treat bcmcmd as a supervisor task so we could collect stdout/stderr (#1825)
1 parent aa08555 commit 6a9bfaf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ else
1818
fi
1919
fi
2020

21+
rm -f /var/run/sswsyncd/sswsyncd.socket
2122
supervisorctl start syncd
2223

2324
# Function: wait until syncd has created the socket for bcmcmd to connect to
@@ -36,5 +37,5 @@ wait_syncd() {
3637
# If this platform has an initialization file for the Broadcom LED microprocessor, load it
3738
if [ -r ${PLATFORM_DIR}/led_proc_init.soc ]; then
3839
wait_syncd
39-
/usr/bin/bcmcmd -t 60 "rcload ${PLATFORM_DIR}/led_proc_init.soc"
40+
supervisorctl start ledinit
4041
fi

platform/broadcom/docker-syncd-brcm/supervisord.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,11 @@ autostart=false
2626
autorestart=false
2727
stdout_logfile=syslog
2828
stderr_logfile=syslog
29+
30+
[program:ledinit]
31+
command=/usr/bin/bcmcmd -t 60 "rcload /usr/share/sonic/platform/led_proc_init.soc"
32+
priority=4
33+
autostart=false
34+
autorestart=false
35+
stdout_logfile=syslog
36+
stderr_logfile=syslog

0 commit comments

Comments
 (0)