]> Frank Brehm's Git Trees - config/bruni/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorFrank Brehm <frank@brehm-online.com>
Sat, 17 Dec 2016 17:13:17 +0000 (18:13 +0100)
committerFrank Brehm <frank@brehm-online.com>
Sat, 17 Dec 2016 17:13:17 +0000 (18:13 +0100)
conf.d/fancontrol [new file with mode: 0644]
init.d/fancontrol
init.d/lm_sensors
sensors3.conf

diff --git a/conf.d/fancontrol b/conf.d/fancontrol
new file mode 100644 (file)
index 0000000..a716958
--- /dev/null
@@ -0,0 +1,16 @@
+# /etc/conf.d/fancontrol
+
+# Configuration file
+#FANCONTROL_CONFIGFILE="/etc/fancontrol"
+
+# You can use this configuration option to pass additional options to the
+# start-stop-daemon, see start-stop-daemon(8) for more details.
+# Per default we forces fancontrol into background and wait 1000ms after we
+# have started the service to ensure that the daemon is really up and
+# running.
+#FANCONTROL_SSDARGS="--background --wait 1000"
+
+# The termination timeout (start-stop-daemon parameter "retry") ensures
+# that the service will be terminated within a given time (60 + 5 seconds
+# per default) when you are stopping the service.
+#FANCONTROL_TERMTIMEOUT="TERM/60/KILL/5"
index 0474d12b32081e21effea57f8077c0aef1407cd4..05f787d026dcc70e0d5c68b52a58f34edf08ff67 100755 (executable)
@@ -1,23 +1,22 @@
-#!/sbin/runscript
-# Copyright 1999-2012 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-CONFIG=/etc/fancontrol
+FANCONTROL_CONFIGFILE=${FANCONTROL_CONFIGFILE:-"/etc/fancontrol"}
+FANCONTROL_SSDARGS=${FANCONTROL_SSDARGS:-"--background --wait 1000"}
+FANCONTROL_TERMTIMEOUT=${FANCONTROL_TERMTIMEOUT:-"TERM/60/KILL/5"}
+
+
+command="/usr/sbin/fancontrol"
+command_args="${FANCONTROL_CONFIGFILE}"
+start_stop_daemon_args="${FANCONTROL_SSDARGS}"
+pidfile="/run/fancontrol.pid"
+retry="${FANCONTROL_TERMTIMEOUT}"
+
+required_files="${FANCONTROL_CONFIGFILE}"
 
 depend() {
        need localmount
        use lm_sensors
 }
-
-command=/usr/sbin/fancontrol
-command_arguments="${CONFIG}"
-start_stop_daemon_args="--background"
-pidfile=/var/run/fancontrol.pid
-
-start_pre() {
-       if [ ! -f ${CONFIG} ]; then
-               eerror "Configuration file ${CONFIG} not found"
-               return 1
-       fi
-}
index b33814f626654cbf664086bd6d3709909af32a7c..4804b7832e9271e4aa5d5cdc34b5f490dfc44f89 100755 (executable)
-#!/sbin/runscript
-# Copyright 1999-2006 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-checkconfig() {
-       if [ ! -f /etc/conf.d/lm_sensors ]; then
-               eerror "/etc/conf.d/lm_sensors does not exist, try running sensors-detect"
-               return 1
-       fi
+command="/usr/bin/sensors"
 
-       if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
-               if [ -z "${MODULE_0}" ]; then
-                       eerror "MODULE_0 is not set in /etc/conf.d/lm_sensors, try running sensors-detect"
-                       return 1
-               fi
-       fi
+depend() {
+       need localmount
+       after modules-load
 }
 
 start() {
-       checkconfig || return 1
-
-       if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
-               einfo "Loading lm_sensors modules..."
-
-               mount | grep sysfs >/dev/null 2>&1
-               if [ ${?} = 0 ]; then
-                       if ! ( [ -e /sys/i2c ] || [ -e /sys/bus/i2c ] ); then
-                               ebegin "  Loading i2c-core"
-                               modprobe i2c-core >/dev/null 2>&1
-                               if [ ${?} != 0 ]; then
-                                       eerror "    Could not load i2c-core!"
-                                       eend 1
-                               fi
-                               ( [ -e /sys/i2c ] || [ -e /sys/bus/i2c ] ) || return 1
-                               eend 0
-                       fi
-               elif ! [ -e /proc/sys/dev/sensors ]; then
-                       ebegin "  Loading i2c-proc"
-                       modprobe i2c-proc >/dev/null 2>&1
-                       if [ ${?} != 0 ]; then
-                               eerror "    Could not load i2c-proc!"
-                               eend 1
-                       fi
-                       [ -e /proc/sys/dev/sensors ] || return 1
-                       eend 0
-               fi
-
-               i=0
-               while true; do
-                       module=`eval echo '$'MODULE_${i}`
-                       module_args=`eval echo '$'MODULE_${i}_ARGS`
-                       if [ -z "${module}" ]; then
-                               break
-                       fi
-                       ebegin "  Loading ${module}"
-                       modprobe ${module} ${module_args} >/dev/null 2>&1
-                       eend $?
-                       i=$(($i+1))
-               done
-       fi
-
-       if [ "${INITSENSORS}" = "yes" ]; then
-               if ! [ -f /etc/sensors3.conf ]; then
-                       eerror "/etc/sensors3.conf does not exist!"
-                       return 1
-               fi
-
-               ebegin "Initializing sensors"
-               /usr/bin/sensors -s >/dev/null 2>&1
-               eend ${?}
-       fi
+       ebegin "Initializing sensors"
+       ${command} --set >/dev/null 2>&1
+       eend $?
 }
 
 stop() {
-       checkconfig || return 1
-
-       if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
-               einfo "Unloading lm_sensors modules..."
-
-               # find the highest possible MODULE_ number
-               i=0
-               while true; do
-                       module=`eval echo '$'MODULE_${i}`
-                       if [ -z "${module}" ] ; then
-                               break
-                       fi
-                       i=$(($i+1))
-               done
-
-               while [ ${i} -gt 0 ]; do
-                       i=$(($i-1))
-                       module=`eval echo '$'MODULE_${i}`
-                       ebegin "  Unloading ${module}"
-                       rmmod ${module} >/dev/null 2>&1
-                       eend $?
-               done
-
-               if [ -e /proc/sys/dev/sensors ] ; then
-                       ebegin "  Unloading i2c-proc"
-                       rmmod i2c-proc >/dev/null 2>&1
-                       eend $?
-               fi
-       fi
+       # Nothing to stop
+       return 0;
 }
index cd761ef7b4828ee90817cbb40c7441aab026dc56..0365c6e5db64a86cd8e45410e98a8787ea993303 100644 (file)
@@ -308,7 +308,7 @@ chip "w83627thf-*"
 #    set in8_max  3.0 * 1.10
 
 
-chip "w83627ehf-*" "w83627dhg-*" "w83667hg-*" "nct6775-*" "nct6776-*"
+chip "w83627ehf-*" "w83627dhg-*" "w83667hg-*" "nct6775-*" "nct6776-*" "nct6779-*" "nct6791-*"
 
     label in0 "Vcore"
     label in2 "AVCC"