From 0ebe9edb41009d9795fc3aa7ac167557a665aabb Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Tue, 5 Dec 2017 18:03:39 -0700 Subject: [PATCH] lm-sensors: add init script "sensors -s" needs to happen at boot-time so that any "set" statements in sensors.conf file can take effect. Signed-off-by: Philip Prindeville --- utils/lm-sensors/Makefile | 4 +++- utils/lm-sensors/files/lm-sensors.init | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 utils/lm-sensors/files/lm-sensors.init diff --git a/utils/lm-sensors/Makefile b/utils/lm-sensors/Makefile index 13aa5b9235..3ea3b4f237 100644 --- a/utils/lm-sensors/Makefile +++ b/utils/lm-sensors/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lm-sensors PKG_VERSION:=3.3.5 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/groeck/lm-sensors.git @@ -101,6 +101,8 @@ ifeq ($(ARCH),i386) $(INSTALL_DIR) $(1)/etc $(INSTALL_CONF) ./files/sensors.conf $(1)/etc/sensors.conf endif + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/lm-sensors.init $(1)/etc/init.d/lm-sensors endef define Package/lm-sensors-detect/install diff --git a/utils/lm-sensors/files/lm-sensors.init b/utils/lm-sensors/files/lm-sensors.init new file mode 100644 index 0000000000..5ac7a72401 --- /dev/null +++ b/utils/lm-sensors/files/lm-sensors.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2017 Philip Prindeville, Redfish Solutions LLC + +START=28 +STOP= + +PROG=/usr/sbin/sensors + +start() { + [ -f /etc/sensors.conf -o -f /etc/sensors3.conf ] || return + + $PROG -s +} + -- 2.30.2