diff --git a/skel-root/coolstream/hd1/etc/init.d/start_neutrino b/skel-root/coolstream/hd1/etc/init.d/start_neutrino index f3fc06e4..902ced46 100755 --- a/skel-root/coolstream/hd1/etc/init.d/start_neutrino +++ b/skel-root/coolstream/hd1/etc/init.d/start_neutrino @@ -30,5 +30,16 @@ if [ -e /tmp/.reboot ]; then # gets created by neutrino reboot elif [ -e /tmp/.halt ]; then dt -t"SHUTDOWN" + + TIMER="/tmp/.timer" + if [ -e $TIMER ]; then + # custom poweroff binary + if type shutdown_helper > /dev/null; then + PARAM=`cat $TIMER` + echo "calling 'shutdown_helper "$PARAM"'" + shutdown_helper $PARAM + fi + fi + 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 fa0c50d6..6dbb55bb 100755 --- a/skel-root/coolstream/hd2/etc/init.d/start_neutrino +++ b/skel-root/coolstream/hd2/etc/init.d/start_neutrino @@ -34,5 +34,16 @@ if [ -e /tmp/.reboot ]; then # gets created by neutrino reboot elif [ -e /tmp/.halt ]; then dt -t"SHUTDOWN" + + TIMER="/tmp/.timer" + if [ -e $TIMER ]; then + # custom poweroff binary + if type shutdown_helper > /dev/null; then + PARAM=`cat $TIMER` + echo "calling 'shutdown_helper "$PARAM"'" + shutdown_helper $PARAM + fi + fi + poweroff fi