From b6acac4e6a99e9981ef57bfa16f4f8aa98e6ea7b Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Fri, 7 May 2021 01:55:40 -0700 Subject: [PATCH] [brcm] Fix and simplify start_led.sh (#7548) LED_PROC_INIT_SOC variable was incorrectly referenced as LED_SOC_INIT_SOC. Introduced in #5483 Rather than fixing the typo, I decided to simplify the script, removing the need for the conditional altogether by moving the bcmcmd call inside the conditional which checks for the presence of LED_SOC_INIT_SOC. --- platform/broadcom/docker-syncd-brcm/start_led.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/platform/broadcom/docker-syncd-brcm/start_led.sh b/platform/broadcom/docker-syncd-brcm/start_led.sh index 964aa23eb0..0b133d6d81 100755 --- a/platform/broadcom/docker-syncd-brcm/start_led.sh +++ b/platform/broadcom/docker-syncd-brcm/start_led.sh @@ -4,11 +4,6 @@ PLATFORM_DIR=/usr/share/sonic/platform SYNCD_SOCKET_FILE=/var/run/sswsyncd/sswsyncd.socket LED_PROC_INIT_SOC=${PLATFORM_DIR}/led_proc_init.soc -if [ ! -f "$LED_PROC_INIT_SOC" ]; then - echo "No soc led configuration found under $LED_SOC_INIT_SOC" - exit 0 -fi - # Function: wait until syncd has created the socket for bcmcmd to connect to wait_syncd() { while true; do @@ -38,6 +33,6 @@ wait_syncd() { # If this platform has an initialization file for the Broadcom LED microprocessor, load it if [[ -r "$LED_PROC_INIT_SOC" && ! -f /var/warmboot/warm-starting ]]; then wait_syncd + /usr/bin/bcmcmd -t 60 "rcload $LED_PROC_INIT_SOC" fi -/usr/bin/bcmcmd -t 60 "rcload $LED_PROC_INIT_SOC"