2016-09-09 19:53:41 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
function clean_up {
|
|
|
|
service syncd stop
|
|
|
|
service rsyslog stop
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
|
|
|
trap clean_up SIGTERM SIGKILL
|
|
|
|
|
2016-10-18 13:22:29 -05:00
|
|
|
# fw-upgrade will exit if firmware was actually upgraded or if some error
|
|
|
|
# occures
|
|
|
|
. mlnx-fw-upgrade.sh
|
|
|
|
|
2016-10-19 16:39:44 -05:00
|
|
|
# FIXME: the script cannot trap SIGTERM signal and it exits without clean_up
|
|
|
|
# Remove rsyslogd.pid file manually so that to start the rsyslog instantly
|
|
|
|
[ -e /var/run/rsyslogd.pid ] && rm /var/run/rsyslogd.pid
|
2016-09-09 19:53:41 -05:00
|
|
|
service rsyslog start
|
|
|
|
service syncd start
|
|
|
|
|
|
|
|
read
|