Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[brcm] Skip ledinit if there is no led_proc_init.soc file #5483

Merged
merged 1 commit into from
Oct 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions platform/broadcom/docker-syncd-brcm/start_led.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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() {
Expand Down Expand Up @@ -30,8 +36,8 @@ wait_syncd() {
}

# If this platform has an initialization file for the Broadcom LED microprocessor, load it
if [[ -r ${PLATFORM_DIR}/led_proc_init.soc && ! -f /var/warmboot/warm-starting ]]; then
if [[ -r "$LED_PROC_INIT_SOC" && ! -f /var/warmboot/warm-starting ]]; then
wait_syncd
fi

/usr/bin/bcmcmd -t 60 "rcload /usr/share/sonic/platform/led_proc_init.soc"
/usr/bin/bcmcmd -t 60 "rcload $LED_PROC_INIT_SOC"