2017-05-08 17:43:31 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-03-06 20:51:46 -06:00
|
|
|
declare -r EXIT_SUCCESS="0"
|
|
|
|
|
2017-05-08 17:43:31 -05:00
|
|
|
mkdir -p /var/sonic
|
|
|
|
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
|
|
|
|
|
|
|
|
rm -f /var/run/rsyslogd.pid
|
|
|
|
|
|
|
|
supervisorctl start rsyslogd
|
2017-06-23 17:23:00 -05:00
|
|
|
|
2019-03-06 20:51:46 -06:00
|
|
|
# If this platform has synchronization script, run it
|
|
|
|
if [ -e /usr/share/sonic/platform/platform_wait ]; then
|
|
|
|
/usr/share/sonic/platform/platform_wait
|
|
|
|
EXIT_CODE="$?"
|
|
|
|
if [ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]; then
|
|
|
|
supervisorctl shutdown
|
|
|
|
exit "${EXIT_CODE}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2017-06-23 17:23:00 -05:00
|
|
|
# If this platform has an lm-sensors config file, copy it to it's proper place
|
|
|
|
# and start lm-sensors
|
|
|
|
if [ -e /usr/share/sonic/platform/sensors.conf ]; then
|
|
|
|
mkdir -p /etc/sensors.d
|
|
|
|
/bin/cp -f /usr/share/sonic/platform/sensors.conf /etc/sensors.d/
|
|
|
|
supervisorctl start lm-sensors
|
|
|
|
fi
|
|
|
|
|
|
|
|
# If this platform has a fancontrol config file, copy it to it's proper place
|
|
|
|
# and start fancontrol
|
|
|
|
if [ -e /usr/share/sonic/platform/fancontrol ]; then
|
2017-09-30 12:55:03 -05:00
|
|
|
# Remove stale pid file if it exists
|
|
|
|
rm -f /var/run/fancontrol.pid
|
|
|
|
|
2017-06-23 17:23:00 -05:00
|
|
|
/bin/cp -f /usr/share/sonic/platform/fancontrol /etc/
|
|
|
|
supervisorctl start fancontrol
|
|
|
|
fi
|
|
|
|
|
2019-03-22 04:49:35 -05:00
|
|
|
{% if not skip_ledd %}
|
2017-06-11 00:05:11 -05:00
|
|
|
supervisorctl start ledd
|
2019-03-22 04:49:35 -05:00
|
|
|
{% endif %}
|
2018-08-03 18:33:56 -05:00
|
|
|
|
2019-03-22 04:49:35 -05:00
|
|
|
{% if not skip_xcvrd %}
|
2018-08-03 18:33:56 -05:00
|
|
|
supervisorctl start xcvrd
|
2019-03-22 04:49:35 -05:00
|
|
|
{% endif %}
|
2019-01-15 23:24:47 -06:00
|
|
|
|
2019-03-22 04:49:35 -05:00
|
|
|
{% if not skip_psud %}
|
2019-01-15 23:24:47 -06:00
|
|
|
supervisorctl start psud
|
2019-03-22 04:49:35 -05:00
|
|
|
{% endif %}
|
2019-06-18 13:02:24 -05:00
|
|
|
|
|
|
|
{% if not skip_syseepromd %}
|
|
|
|
supervisorctl start syseepromd
|
|
|
|
{% endif %}
|
|
|
|
|