Browse Source

- start_neutrino: better readability

master
vanhofen 6 years ago
parent
commit
834bc656aa
  1. 12
      skel-root/armbox/bre2ze4k/etc/init.d/start_neutrino
  2. 12
      skel-root/armbox/hd51/etc/init.d/start_neutrino
  3. 12
      skel-root/coolstream/hd1/etc/init.d/start_neutrino
  4. 12
      skel-root/coolstream/hd2/etc/init.d/start_neutrino

12
skel-root/armbox/bre2ze4k/etc/init.d/start_neutrino

@ -2,6 +2,12 @@
. /etc/init.d/globals
# Neutrino's exit codes
ERROR=-1
NORMAL=0
SHUTDOWN=1
REBOOT=2
if [ -e /var/etc/.coredump ]; then
ulimit -c unlimited
fi
@ -33,13 +39,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

12
skel-root/armbox/hd51/etc/init.d/start_neutrino

@ -2,6 +2,12 @@
. /etc/init.d/globals
# Neutrino's exit codes
ERROR=-1
NORMAL=0
SHUTDOWN=1
REBOOT=2
if [ -e /var/etc/.coredump ]; then
ulimit -c unlimited
fi
@ -33,13 +39,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

12
skel-root/coolstream/hd1/etc/init.d/start_neutrino

@ -2,6 +2,12 @@
. /etc/init.d/globals
# 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
@ -26,13 +32,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

12
skel-root/coolstream/hd2/etc/init.d/start_neutrino

@ -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

Loading…
Cancel
Save