diff --git a/make/neutrino.mk b/make/neutrino.mk index 36f1cb51..934ae097 100644 --- a/make/neutrino.mk +++ b/make/neutrino.mk @@ -168,10 +168,16 @@ $(D)/neutrino: $(N_OBJ_DIR)/config.status PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ $(MAKE) -C $(N_OBJ_DIR) all DESTDIR=$(TARGET_DIR) $(MAKE) -C $(N_OBJ_DIR) install DESTDIR=$(N_INST_DIR) + $(MAKE) $(TARGET_DIR)/etc/init.d/start_neutrino $(TOUCH) # ----------------------------------------------------------------------------- +$(TARGET_DIR)/etc/init.d/start_neutrino: + $(INSTALL_EXEC) -D $(IMAGEFILES)/scripts/start_neutrino.$(BOXTYPE) $@ + +# ----------------------------------------------------------------------------- + LH_OBJ_DIR = $(BUILD_TMP)/$(NI-LIBSTB-HAL) # ----------------------------------------------------------------------------- @@ -253,6 +259,7 @@ neutrino-distclean: neutrino-clean: neutrino-uninstall neutrino-distclean rm -f $(N_OBJ_DIR)/config.status rm -f $(D)/neutrino + rm -f $(TARGET_DIR)/etc/init.d/start_neutrino neutrino-clean-all: neutrino-clean rm -rf $(N_OBJ_DIR) diff --git a/skel-root/armbox/hd51/etc/init.d/start_neutrino b/skel-root/armbox/hd51/etc/init.d/start_neutrino deleted file mode 100755 index 37414734..00000000 --- a/skel-root/armbox/hd51/etc/init.d/start_neutrino +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh - -. /etc/init.d/globals - -# Neutrino's exit codes -ERROR=-1 -NORMAL=0 -SHUTDOWN=1 -REBOOT=2 - -# uncomment for gstreamer debugging -#export GST_DEBUG=4 - -# if neutrino crashes, just restart it or reboot the box? -REBOOT_ON_ERROR=false - -do_cleanup() { - # remove files created by neutrino - rm -f /tmp/.timer -} - -do_shutdown() { - echo "Shutdown ..." > /dev/dbox/oled0 - poweroff -} - -do_reboot() { - echo "Reboot ..." > /dev/dbox/oled0 - reboot -} - -while true; do - do_cleanup - - neutrino; RET=$? - LOGINFO "Neutrino exited with exit code $RET" - - if [ $RET -eq $NORMAL ]; then - # do nothing - break - elif [ $RET -eq $SHUTDOWN ]; then - do_shutdown - break - elif [ $RET -eq $REBOOT ]; then - do_cleanup - do_reboot - break - fi - - echo "Neutrino: $RET" > /dev/dbox/oled0 - - # report errors on external display - if [ -e /tmp/.lcd-* ]; then - echo "0" > /tmp/lcd/mode_logo - echo "Neutrino" > /tmp/lcd/service - echo "Error: $RET" > /tmp/lcd/event - fi - - if $REBOOT_ON_ERROR; then - LOGINFO "Rebooting due to REBOOT_ON_ERROR=true and exit code $RET" - do_reboot - break - fi - - LOGINFO "Restarting neutrino after exit code $RET" -done diff --git a/skel-root/coolstream/hd2/etc/init.d/start_neutrino b/skel-root/coolstream/hd2/etc/init.d/start_neutrino deleted file mode 100755 index 37f7fdf9..00000000 --- a/skel-root/coolstream/hd2/etc/init.d/start_neutrino +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh - -. /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 - -do_cleanup() { - # remove files created by neutrino - rm -f /tmp/.timer -} - -do_shutdown() { - dt -t"SHUTDOWN" - poweroff -} - -do_reboot() { - dt -t"REBOOT" - reboot -} - -while true; do - do_cleanup - - neutrino; RET=$? - LOGINFO "Neutrino exited with exit code $RET" - - if [ $RET -eq $NORMAL ]; then - # do nothing - break - elif [ $RET -eq $SHUTDOWN ]; then - do_shutdown - break - elif [ $RET -eq $REBOOT ]; then - do_cleanup - do_reboot - break - fi - - dt -t"NEUTRINO: $RET" - - # report errors on external display - if [ -e /tmp/.lcd-* ]; then - echo "0" > /tmp/lcd/mode_logo - echo "Neutrino" > /tmp/lcd/service - echo "Error: $RET" > /tmp/lcd/event - fi - - if $REBOOT_ON_ERROR; then - LOGINFO "Rebooting due to REBOOT_ON_ERROR=true and exit code $RET" - do_reboot - break - fi - - LOGINFO "Restarting neutrino after exit code $RET" -done diff --git a/skel-root/armbox/bre2ze4k/etc/init.d/start_neutrino b/skel-root/general/scripts/start_neutrino.armbox old mode 100755 new mode 100644 similarity index 100% rename from skel-root/armbox/bre2ze4k/etc/init.d/start_neutrino rename to skel-root/general/scripts/start_neutrino.armbox diff --git a/skel-root/coolstream/hd1/etc/init.d/start_neutrino b/skel-root/general/scripts/start_neutrino.coolstream old mode 100755 new mode 100644 similarity index 100% rename from skel-root/coolstream/hd1/etc/init.d/start_neutrino rename to skel-root/general/scripts/start_neutrino.coolstream