#!/bin/sh touch /tmp/norestart if [ -e /var/etc/.coredump ]; then ulimit -c unlimited fi # uncomment for gstreamer debugging #export GST_DEBUG=4 until neutrino; do RET=$? # shutdown if [ $RET -eq 1 ]; then touch /tmp/.halt break fi echo "Neutrino exited with exit code $RET" echo "Neutrino: $RET" > /dev/dbox/oled0 if [ -e /tmp/.lcd-usbdev?.? ]; then echo "0" > /tmp/lcd/mode_logo echo "Neutrino" > /tmp/lcd/service echo "Error: $RET" > /tmp/lcd/event fi while [ -e /tmp/norestart ]; do # for debugging: stop the restart loop sleep 1; done done if [ -e /tmp/.reboot ]; then # gets created by neutrino echo "Reboot ..." > /dev/dbox/oled0 reboot elif [ -e /tmp/.halt ]; then echo "Shutdown ..." > /dev/dbox/oled0 poweroff fi