From d4becc5a524ad28085be4d98b45880a322700297 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 3 Aug 2019 14:55:22 +0200 Subject: [PATCH] - move custom-poweroff init script away from skel-root --- make/target-scripts.mk | 6 ++++++ .../coolstream/hd2/etc/init.d/custom-poweroff | 20 ------------------- .../scripts/custom-poweroff.init} | 0 3 files changed, 6 insertions(+), 20 deletions(-) delete mode 100755 skel-root/coolstream/hd2/etc/init.d/custom-poweroff rename skel-root/{coolstream/hd1/etc/init.d/custom-poweroff => general/scripts/custom-poweroff.init} (100%) mode change 100755 => 100644 diff --git a/make/target-scripts.mk b/make/target-scripts.mk index 35411eec..28894af7 100644 --- a/make/target-scripts.mk +++ b/make/target-scripts.mk @@ -10,6 +10,7 @@ init-scripts: \ $(TARGET_DIR)/etc/init.d/camd_datefix \ $(TARGET_DIR)/etc/init.d/coredump \ $(TARGET_DIR)/etc/init.d/crond \ + $(TARGET_DIR)/etc/init.d/custom-poweroff \ $(TARGET_DIR)/etc/init.d/hostname \ $(TARGET_DIR)/etc/init.d/inetd \ $(TARGET_DIR)/etc/init.d/swap \ @@ -39,6 +40,11 @@ $(TARGET_DIR)/etc/init.d/crond: ln -sf crond $(TARGET_DIR)/etc/init.d/S55crond ln -sf crond $(TARGET_DIR)/etc/init.d/K55crond +$(TARGET_DIR)/etc/init.d/custom-poweroff: +ifeq ($(BOXTYPE), coolstream) + $(INSTALL_EXEC) -D $(IMAGEFILES)/scripts/custom-poweroff.init $@ +endif + $(TARGET_DIR)/etc/init.d/hostname: $(INSTALL_EXEC) -D $(IMAGEFILES)/scripts/hostname.init $@ diff --git a/skel-root/coolstream/hd2/etc/init.d/custom-poweroff b/skel-root/coolstream/hd2/etc/init.d/custom-poweroff deleted file mode 100755 index 59e458bc..00000000 --- a/skel-root/coolstream/hd2/etc/init.d/custom-poweroff +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -. /etc/init.d/globals - -case $1 in - stop) - TIMER="/tmp/.timer" - test -e $TIMER || exit 0 - - if type shutdown_helper > /dev/null; then - # send current time, wakeup time, led and bright settings to frontpanel - PARAM=`cat $TIMER` - SHOWINFO "calling 'shutdown_helper "$PARAM"'" - shutdown_helper $PARAM - fi - ;; - *) - echo "[$BASENAME] Usage: $0 {stop}" - ;; -esac diff --git a/skel-root/coolstream/hd1/etc/init.d/custom-poweroff b/skel-root/general/scripts/custom-poweroff.init old mode 100755 new mode 100644 similarity index 100% rename from skel-root/coolstream/hd1/etc/init.d/custom-poweroff rename to skel-root/general/scripts/custom-poweroff.init