diff options
author | Britney Fransen <brfransen@gmail.com> | 2014-03-07 21:24:40 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2014-03-07 21:24:40 (GMT) |
commit | 17a417e13530325e7e6a5ebb5277f2c42685a74a (patch) | |
tree | 7db53222f6f5e1868e0053c001f74e2be9a390fe /abs/extra/lm_sensors/sensors.rc | |
parent | 4c44c7fa3ce44ac09e044d41dde9e428c09de1c0 (diff) | |
download | linhes_pkgbuild-17a417e13530325e7e6a5ebb5277f2c42685a74a.zip linhes_pkgbuild-17a417e13530325e7e6a5ebb5277f2c42685a74a.tar.gz linhes_pkgbuild-17a417e13530325e7e6a5ebb5277f2c42685a74a.tar.bz2 |
lm_sensors: update to 3.3.5 and update bin path. refs #961
Diffstat (limited to 'abs/extra/lm_sensors/sensors.rc')
-rw-r--r-- | abs/extra/lm_sensors/sensors.rc | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/abs/extra/lm_sensors/sensors.rc b/abs/extra/lm_sensors/sensors.rc deleted file mode 100644 index 4acde22..0000000 --- a/abs/extra/lm_sensors/sensors.rc +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash - -# description: sensors is used for monitoring motherboard sensor values. -# config: /etc/conf.d/lm_sensors - -# See also the lm_sensors homepage at: -# http://www2.lm-sensors.nu/~lm78/index.html - -# It uses a config file /etc/conf.d/lm_sensors that contains the modules to -# be loaded/unloaded. That file is sourced into this one. - -# The format of that file a shell script that simply defines the modules -# in order as normal shell variables with the special names: -# MODULE_1, MODULE_2, MODULE_3, etc. - -. /etc/rc.conf -. /etc/rc.d/functions - -PSENSORS=/usr/bin/sensors - -if $(grep -q sysfs /proc/mounts); then - WITHSYS=1 -else - WITHSYS=0 -fi - -if [ $WITHSYS == "0" ]; then - # If sensors isn't supported by the kernel, try loading the module... - [ -e /proc/sys/dev/sensors ] || /sbin/modprobe i2c-proc &>/dev/null - - # Don't bother if /proc/sensors still doesn't exist, kernel doesn't have support for sensors. - if ! [ -e /proc/sys/dev/sensors ]; then - echo "lm_sensors: kernel does not have sensors support" - stat_fail - fi - - # If sensors was not already running, unload the module... - [ -e /var/run/daemons/sensors ] || /sbin/modprobe -r i2c-proc &>/dev/null -fi - -if [ -e /etc/conf.d/lm_sensors ]; then - CONFIG=/etc/conf.d/lm_sensors -elif [ -e /etc/sysconfig/lm_sensors ]; then - # Moving config to new Arch-specific location - mv /etc/sysconfig/lm_sensors /etc/conf.d/lm_sensors - CONFIG=/etc/conf.d/lm_sensors -fi - -case "$1" in - start) - stat_busy "Starting Up Sensors" - - if [ -r "$CONFIG" ]; then - . "$CONFIG" - modules=$(grep \^MODULE_ $CONFIG | wc -l | tr -d ' ') - i=0 - while [ $i -lt $modules ] ; do - module=$(eval echo '$'MODULE_$i) - # echo starting module __${module}__ #debug - /sbin/modprobe $module &>/dev/null - i=$(expr $i + 1) - done - fi - - $PSENSORS -s - - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon sensors - stat_done - fi - ;; - - stop) - stat_busy "Shutting Down Sensors" - - if [ -r "$CONFIG" ]; then - . "$CONFIG" - modules=$(grep \^MODULE_ $CONFIG | wc -l | tr -d ' ') - i=$(expr $modules - 1) - while [ $i -ge 0 ] ; do - module=$(eval echo '$'MODULE_$i) - # echo stoping module __${module}__ #debug - /sbin/modprobe -r $module &>/dev/null - i=$(expr $i - 1) - done - fi - - if [ $WITHSYS == "0" ]; then - /sbin/modprobe -r i2c-proc &>/dev/null - fi - - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon sensors - stat_done - fi - ;; - - status) - $PSENSORS - ;; - - restart) - $0 stop - sleep 1 - $0 start - ;; - - condrestart) - [ -e /var/run/daemons/sensors ] && $0 restart || : - ;; - - *) - echo "Usage: $0 {start|stop|restart|status|condrestart}" -esac -exit 0 |