From e31ec214c7b9901afe42342a5a84f7434e0ff48d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 20 Dec 2019 20:51:29 +0100 Subject: [PATCH] - skel-root: add init script to modify procfs --- make/target-scripts.mk | 7 +++++++ skel-root/general/scripts/proc.init | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 skel-root/general/scripts/proc.init diff --git a/make/target-scripts.mk b/make/target-scripts.mk index d348a3e1..13bf5f34 100644 --- a/make/target-scripts.mk +++ b/make/target-scripts.mk @@ -20,6 +20,7 @@ init-scripts: \ $(TARGET_DIR)/etc/init.d/mdev \ $(TARGET_DIR)/etc/init.d/networking \ $(TARGET_DIR)/etc/init.d/partitions-by-name \ + $(TARGET_DIR)/etc/init.d/proc \ $(TARGET_DIR)/etc/init.d/resizerootfs \ $(TARGET_DIR)/etc/init.d/swap \ $(TARGET_DIR)/etc/init.d/sys_update.sh \ @@ -82,6 +83,12 @@ ifeq ($(BOXMODEL), $(filter $(BOXMODEL), hd51 bre2ze4k h7)) $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/partitions-by-name.init $(@) endif +$(TARGET_DIR)/etc/init.d/proc: +ifeq ($(BOXMODEL), $(filter $(BOXMODEL), hd51 bre2ze4k h7 vusolo4k vuduo4k vuultimo4k vuzero4k vuuno4k vuuno4kse vuduo)) + $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/proc.init $(@) + $(UPDATE-RC.D) $(@F) start 90 S . +endif + $(TARGET_DIR)/etc/init.d/resizerootfs: ifeq ($(BOXMODEL), $(filter $(BOXMODEL), hd51 bre2ze4k h7)) $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/resizerootfs.init $(@) diff --git a/skel-root/general/scripts/proc.init b/skel-root/general/scripts/proc.init new file mode 100644 index 00000000..7c2a3843 --- /dev/null +++ b/skel-root/general/scripts/proc.init @@ -0,0 +1,15 @@ +#!/bin/sh + +. /etc/init.d/globals + +case $1 in + start) + test -e /proc/cpu/alignment && \ + echo -n "3" > /proc/cpu/alignment + test -e /proc/stb/video/zapmode && \ + echo -n "mute" > /proc/stb/video/zapmode + ;; + *) + echo "[$BASENAME] Usage: $0 {start}" + ;; +esac