|
|
@ -6,6 +6,12 @@ if [ -e /var/etc/.coredump ]; then |
|
|
|
ulimit -c unlimited |
|
|
|
fi |
|
|
|
|
|
|
|
# Neutrino's exit codes |
|
|
|
ERROR=-1 |
|
|
|
NORMAL=0 |
|
|
|
SHUTDOWN=1 |
|
|
|
REBOOT=2 |
|
|
|
|
|
|
|
# if neutrino crashes, just restart it or reboot the box? |
|
|
|
REBOOT_ON_ERROR=true |
|
|
|
|
|
|
@ -30,13 +36,13 @@ while true; do |
|
|
|
neutrino; RET=$? |
|
|
|
LOGINFO "Neutrino exited with exit code $RET" |
|
|
|
|
|
|
|
if [ $RET -eq 0 ]; then |
|
|
|
if [ $RET -eq $NORMAL ]; then |
|
|
|
# do nothing |
|
|
|
break |
|
|
|
elif [ $RET -eq 1 ]; then |
|
|
|
elif [ $RET -eq $SHUTDOWN ]; then |
|
|
|
do_shutdown |
|
|
|
break |
|
|
|
elif [ $RET -eq 2 ]; then |
|
|
|
elif [ $RET -eq $REBOOT ]; then |
|
|
|
do_cleanup |
|
|
|
do_reboot |
|
|
|
break |
|
|
|