[docker-syncd-brcm] Reorganize start.sh (#2161)
This commit is contained in:
parent
2a24a303ec
commit
164a1d3326
@ -3,7 +3,25 @@
|
|||||||
PLATFORM_DIR=/usr/share/sonic/platform
|
PLATFORM_DIR=/usr/share/sonic/platform
|
||||||
HWSKU_DIR=/usr/share/sonic/hwsku
|
HWSKU_DIR=/usr/share/sonic/hwsku
|
||||||
|
|
||||||
|
SYNCD_SOCKET_FILE=/var/run/sswsyncd/sswsyncd.socket
|
||||||
|
|
||||||
|
# Function: wait until syncd has created the socket for bcmcmd to connect to
|
||||||
|
wait_syncd() {
|
||||||
|
while true; do
|
||||||
|
if [ -e ${SYNCD_SOCKET_FILE} ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
# wait until bcm sdk is ready to get a request
|
||||||
|
sleep 3
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Remove stale files if they exist
|
||||||
rm -f /var/run/rsyslogd.pid
|
rm -f /var/run/rsyslogd.pid
|
||||||
|
rm -f ${SYNCD_SOCKET_FILE}
|
||||||
|
|
||||||
supervisorctl start rsyslogd
|
supervisorctl start rsyslogd
|
||||||
|
|
||||||
@ -18,22 +36,8 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f /var/run/sswsyncd/sswsyncd.socket
|
|
||||||
supervisorctl start syncd
|
supervisorctl start syncd
|
||||||
|
|
||||||
# Function: wait until syncd has created the socket for bcmcmd to connect to
|
|
||||||
wait_syncd() {
|
|
||||||
while true; do
|
|
||||||
if [ -e /var/run/sswsyncd/sswsyncd.socket ]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
|
|
||||||
# wait until bcm sdk is ready to get a request
|
|
||||||
sleep 3
|
|
||||||
}
|
|
||||||
|
|
||||||
# If this platform has an initialization file for the Broadcom LED microprocessor, load it
|
# If this platform has an initialization file for the Broadcom LED microprocessor, load it
|
||||||
if [ -r ${PLATFORM_DIR}/led_proc_init.soc ]; then
|
if [ -r ${PLATFORM_DIR}/led_proc_init.soc ]; then
|
||||||
wait_syncd
|
wait_syncd
|
||||||
|
Loading…
Reference in New Issue
Block a user