[arch-commits] Commit in lm_sensors/repos (5 files)
Eric Bélanger
eric at archlinux.org
Sat Nov 22 05:05:40 UTC 2008
Date: Saturday, November 22, 2008 @ 00:05:39
Author: eric
Revision: 19391
Merged revisions 19390 via svnmerge from
svn+ssh://svn.archlinux.org/srv/svn-packages/lm_sensors/trunk
........
r19390 | eric | 2008-11-22 00:05:10 -0500 (Sat, 22 Nov 2008) | 2 lines
upgpkg: lm_sensors 3.0.3-1
Upstream update, Updated sensors-detect.patch patch, FHS man pages, Changed sensors daemon script to move config in new location (cf. FS#9516), Did several other fixes and clean up in sensors daemon script, Added ChangeLog
........
Added:
lm_sensors/repos/extra-x86_64/ChangeLog
(from rev 19390, lm_sensors/trunk/ChangeLog)
Modified:
lm_sensors/repos/extra-x86_64/ (properties)
lm_sensors/repos/extra-x86_64/PKGBUILD
lm_sensors/repos/extra-x86_64/sensors-detect.patch
lm_sensors/repos/extra-x86_64/sensors.rc
----------------------+
ChangeLog | 9 ++++
PKGBUILD | 37 ++++++++---------
sensors-detect.patch | 41 ++++++++++++------
sensors.rc | 106 ++++++++++++++++++++++---------------------------
4 files changed, 103 insertions(+), 90 deletions(-)
Property changes on: lm_sensors/repos/extra-x86_64
___________________________________________________________________
Modified: svnmerge-integrated
- /lm_sensors/trunk:1-8685
+ /lm_sensors/trunk:1-19390
Copied: lm_sensors/repos/extra-x86_64/ChangeLog (from rev 19390, lm_sensors/trunk/ChangeLog)
===================================================================
--- extra-x86_64/ChangeLog (rev 0)
+++ extra-x86_64/ChangeLog 2008-11-22 05:05:39 UTC (rev 19391)
@@ -0,0 +1,9 @@
+2008-11-08 Eric Belanger <eric at archlinux.org>
+
+ * lm_sensors 3.0.3-1
+ * Upstream update
+ * Updated sensors-detect.patch patch
+ * FHS man pages
+ * Changed sensors daemon script to move config in new location (cf. FS#9516)
+ * Did several other fixes and clean up in sensors daemon script
+ * Added ChangeLog
Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2008-11-22 05:05:10 UTC (rev 19390)
+++ extra-x86_64/PKGBUILD 2008-11-22 05:05:39 UTC (rev 19391)
@@ -1,37 +1,38 @@
# $Id$
-# Maintainer: aurelien <aurelien at archlinux.org>
+# Maintainer: Eric Belanger <eric at archlinux.org>
# Contributor: Aurelien Foret <orelien at chez.com>
+
pkgname=lm_sensors
-pkgver=3.0.2
-pkgrel=2
+pkgver=3.0.3
+pkgrel=1
pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring."
arch=('i686' 'x86_64')
+url="http://www.lm-sensors.org/"
license=('GPL')
depends=('perl' 'sysfsutils')
makedepends=('bison' 'flex' 'rrdtool')
optdepends=('rrdtool: for logging with sensord')
-backup=(etc/sensors3.conf)
+backup=('etc/sensors3.conf')
install=sensors.install
-source=(http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-$pkgver.tar.bz2
- sensors.rc
- fancontrol.rc
- sensors-detect.patch)
-url="http://www.lm-sensors.org/"
-md5sums=('5b210ba9cc01f00161c438fd618484e5'
- 'c9f7f38964963ae3ced4dff3f1f0b7b9'
- 'f14e335a8eea27388892c36af8099782'
- '6fd30ed1e5ac739b8a27f3913ba706f4')
+source=(http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${pkgver}.tar.bz2 \
+ sensors.rc fancontrol.rc sensors-detect.patch)
+md5sums=('e88b236228ac2a50821217015b8fd0fa' 'c370f5e620bfe41113354a1e22c0c18c'\
+ 'f14e335a8eea27388892c36af8099782' 'c707f86b4808359d08eeb75438ba93bc')
+sha1sums=('2f68d003aef8f83bbef006c5b7b26a88bd9fd036'
+ 'b2e664b9b87759991f02d0a1e8cac5e95098c0a5'
+ '4a5c7b9114118f66e283a728d41b5fa7fe8b551d'
+ '707edbe92324f7601e3c0fa1c9f5d6caa0aeb2ad')
build() {
- cd ${srcdir}/$pkgname-$pkgver
+ cd ${srcdir}/${pkgname}-${pkgver}
patch -Np0 -i ${srcdir}/sensors-detect.patch || return 1
make PREFIX=/usr PROG_EXTRA:=sensord user || return 1
- make user_install PREFIX=/usr DESTDIR=${pkgdir}
- install -DT -m755 ${srcdir}/$pkgname-$pkgver/prog/sensord/sensord ${pkgdir}/usr/sbin/sensord
+ make user_install PREFIX=/usr MANDIR=/usr/share/man DESTDIR=${pkgdir} || return 1
+ install -DT -m755 ${srcdir}/${pkgname}-${pkgver}/prog/sensord/sensord ${pkgdir}/usr/sbin/sensord || return 1
- install -DT -m755 ${srcdir}/sensors.rc ${pkgdir}/etc/rc.d/sensors
- install -DT -m755 ${srcdir}/fancontrol.rc ${pkgdir}/etc/rc.d/fancontrol
+ install -DT -m755 ${srcdir}/sensors.rc ${pkgdir}/etc/rc.d/sensors || return 1
+ install -DT -m755 ${srcdir}/fancontrol.rc ${pkgdir}/etc/rc.d/fancontrol || return 1
# remove the static lib
rm -rf ${pkgdir}/usr/lib/libsensors.a
Modified: extra-x86_64/sensors-detect.patch
===================================================================
--- extra-x86_64/sensors-detect.patch 2008-11-22 05:05:10 UTC (rev 19390)
+++ extra-x86_64/sensors-detect.patch 2008-11-22 05:05:39 UTC (rev 19391)
@@ -1,6 +1,15 @@
---- prog/detect/sensors-detect.orig 2008-02-07 20:59:25.125302226 +0100
-+++ prog/detect/sensors-detect 2008-02-07 21:06:53.821929489 +0100
-@@ -5879,21 +5879,21 @@
+--- prog/detect/sensors-detect.orig 2008-11-08 02:15:07.000000000 -0500
++++ prog/detect/sensors-detect 2008-11-08 02:35:27.000000000 -0500
+@@ -5871,7 +5871,7 @@
+ exit -1;
+ }
+
+- if (-x "/sbin/service" && -f "/etc/init.d/lm_sensors" &&
++ if (-x "/sbin/service" && -f "/etc/rc.d/lm_sensors" &&
+ -f "/var/lock/subsys/lm_sensors") {
+ system("/sbin/service", "lm_sensors", "stop");
+ }
+@@ -6084,21 +6084,21 @@
}
}
@@ -14,9 +23,9 @@
$_ = <STDIN>;
if (($have_sysconfig and not m/^\s*n/i) or m/^\s*y/i) {
unless ($have_sysconfig) {
-- mkdir '/etc/sysconfig', 0777
+- mkdir('/etc/sysconfig', 0777)
- or die "Sorry, can't create /etc/sysconfig ($!)";
-+ mkdir '/etc/conf.d', 0777
++ mkdir('/etc/conf.d', 0777)
+ or die "Sorry, can't create /etc/conf.d ($!)";
}
- open(local *SYSCONFIG, ">/etc/sysconfig/lm_sensors")
@@ -27,35 +36,37 @@
-# /etc/sysconfig/lm_sensors - Defines modules loaded by
-# /etc/init.d/lm_sensors
+# /etc/conf.d/lm_sensors - Defines modules loaded by
-+# /etc/rc.d/sensors
++# /etc/rc.d/lm_sensors
# Copyright (c) 1998 - 2001 Frodo Looijaard <frodol at dds.nl>
#
# This program is free software; you can redistribute it and/or modify
-@@ -5914,8 +5914,8 @@
+@@ -6120,8 +6120,8 @@
# See also the lm_sensors homepage at:
# http://www.lm-sensors.org/
#
-# This file is used by /etc/init.d/lm_sensors and defines the modules to
-# be loaded/unloaded. This file is sourced into /etc/init.d/lm_sensors.
-+# This file is used by /etc/rc.d/sensors and defines the modules to
-+# be loaded/unloaded. This file is sourced into /etc/rc.d/sensors.
++# This file is used by /etc/rc.d/lm_sensors and defines the modules to
++# be loaded/unloaded. This file is sourced into /etc/rc.d/lm_sensors.
#
# The format of this file is a shell script that simply defines the modules
# in order as normal variables with the special names:
-@@ -5952,12 +5952,12 @@
+@@ -6143,13 +6143,13 @@
print SYSCONFIG $sysconfig;
close(SYSCONFIG);
- print "Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors\n".
-+ print "Copy prog/init/lm_sensors.init to /etc/rc.d/sensors\n".
++ print "Copy prog/init/lm_sensors.init to /etc/rc.d/lm_sensors\n".
"for initialization at boot time.\n"
- unless -f "/etc/init.d/lm_sensors";
-+ unless -f "/etc/rc.d/sensors";
++ unless -f "/etc/rc.d/lm_sensors";
- if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
- system("/sbin/insserv", "/etc/init.d/lm_sensors");
-+ if (-x "/sbin/insserv" && -f "/etc/rc.d/sensors") {
-+ system("/sbin/insserv", "/etc/rc.d/sensors");
- } elsif (-x "/sbin/chkconfig" && -f "/etc/init.d/lm_sensors") {
+- } elsif (-x "/sbin/chkconfig" && -f "/etc/init.d/lm_sensors") {
++ if (-x "/sbin/insserv" && -f "/etc/rc.d/lm_sensors") {
++ system("/sbin/insserv", "/etc/rc.d/lm_sensors");
++ } elsif (-x "/sbin/chkconfig" && -f "/etc/rc.d/lm_sensors") {
system("/sbin/chkconfig", "lm_sensors", "on");
if (-x "/sbin/service") {
+ system("/sbin/service", "lm_sensors", "start");
Modified: extra-x86_64/sensors.rc
===================================================================
--- extra-x86_64/sensors.rc 2008-11-22 05:05:10 UTC (rev 19390)
+++ extra-x86_64/sensors.rc 2008-11-22 05:05:39 UTC (rev 19391)
@@ -1,27 +1,12 @@
#!/bin/bash
-#
-# chkconfig: 2345 26 74
+
# description: sensors is used for monitoring motherboard sensor values.
-# config: /etc/sysconfig/sensors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# 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/sysconfig/sensors that contains the modules to
+# 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
@@ -31,46 +16,52 @@
. /etc/rc.conf
. /etc/rc.d/functions
-if grep -q sysfs /proc/mounts; then
+PSENSORS=/usr/bin/sensors
+
+if $(grep -q sysfs /proc/mounts); then
WITHSYS=1
else
WITHSYS=0
fi
-CONFIG=/etc/conf.d/lm_sensors
-PSENSORS=/usr/bin/sensors
-if [ ! -x $PSENSORS ]; then
- PSENSORS=/usr/bin/sensors
+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 [ $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.
- [ -e /proc/sys/dev/sensors ] || exit 0
-
- # If sensors was not already running, unload the module...
- [ -e /var/lock/subsys/lm_sensors ] || /sbin/modprobe -r i2c-proc &>/dev/null
- fi
-
-
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
+ . "$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
@@ -85,14 +76,15 @@
stat_busy "Shutting Down Sensors"
if [ -r "$CONFIG" ]; then
- . "$CONFIG"
- modules=`grep \^MODULE_ $CONFIG | wc -l | tr -d ' '`
- i=`expr $modules`
- while [ $i -ge 0 ] ; do
- module=`eval echo '$'MODULE_$i`
- /sbin/modprobe -r $module &>/dev/null
- i=`expr $i - 1`
- done
+ . "$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
@@ -107,9 +99,8 @@
fi
;;
- dostatus)
+ status)
$PSENSORS
- RETVAL=$?
;;
restart)
@@ -119,9 +110,10 @@
;;
condrestart)
- [ -e /var/lock/subsys/lm_sensors ] && restart || :
+ [ -e /var/run/daemons/sensors ] && $0 restart || :
;;
*)
- echo "Usage: sensors.init {start|stop|status|restart|reload|condrestart}"
+ echo "Usage: $0 {start|stop|restart|status|condrestart}"
esac
+exit 0
More information about the arch-commits
mailing list