Skip to content

Commit

Permalink
[brcm] Fix and simplify start_led.sh (sonic-net#7548)
Browse files Browse the repository at this point in the history
LED_PROC_INIT_SOC variable was incorrectly referenced as LED_SOC_INIT_SOC. Introduced in sonic-net#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.
  • Loading branch information
jleveque authored and raphaelt-nvidia committed May 13, 2021
1 parent 491e7b2 commit 45a04d9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions platform/broadcom/docker-syncd-brcm/start_led.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

0 comments on commit 45a04d9

Please sign in to comment.