From da9290c77c9256e1c671ac56766962d1e819f548 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 18 Oct 2017 11:40:42 +0200 Subject: [PATCH] - skel-root/coolstream: prepare for new neutrino exit behaviour --- skel-root/coolstream/hd1/etc/init.d/start_neutrino | 9 +++++++++ skel-root/coolstream/hd2/etc/init.d/start_neutrino | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/skel-root/coolstream/hd1/etc/init.d/start_neutrino b/skel-root/coolstream/hd1/etc/init.d/start_neutrino index 8b9e6466..f3fc06e4 100755 --- a/skel-root/coolstream/hd1/etc/init.d/start_neutrino +++ b/skel-root/coolstream/hd1/etc/init.d/start_neutrino @@ -5,6 +5,12 @@ touch /tmp/norestart until neutrino; do RET=$? + # shutdown + if [ $RET -eq 1 ]; then + touch /tmp/.halt + break + fi + echo "Neutrino exited with exit code $RET" dt -t"NEUTRINO: $RET" @@ -22,4 +28,7 @@ done if [ -e /tmp/.reboot ]; then # gets created by neutrino dt -t" ..REBOOT.." reboot +elif [ -e /tmp/.halt ]; then + dt -t"SHUTDOWN" + poweroff fi diff --git a/skel-root/coolstream/hd2/etc/init.d/start_neutrino b/skel-root/coolstream/hd2/etc/init.d/start_neutrino index 0697c076..fa0c50d6 100755 --- a/skel-root/coolstream/hd2/etc/init.d/start_neutrino +++ b/skel-root/coolstream/hd2/etc/init.d/start_neutrino @@ -9,6 +9,12 @@ fi until neutrino; do RET=$? + # shutdown + if [ $RET -eq 1 ]; then + touch /tmp/.halt + break + fi + echo "Neutrino exited with exit code $RET" dt -t"NEUTRINO: $RET" @@ -26,4 +32,7 @@ done if [ -e /tmp/.reboot ]; then # gets created by neutrino dt -t" ..REBOOT.." reboot +elif [ -e /tmp/.halt ]; then + dt -t"SHUTDOWN" + poweroff fi