[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.
This commit is contained in:
parent
91b4ce649e
commit
ed52c938c1
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user