summaryrefslogtreecommitdiff
path: root/extra/lm_sensors
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-08-08 00:02:17 +0000
committerroot <root@rshg054.dnsready.net>2012-08-08 00:02:17 +0000
commit6c114b503b2456476f22ff6bdb2b45cac8dac612 (patch)
tree663d91755132361628dec7a42b77734ecf7b36b7 /extra/lm_sensors
parent9d36fcd5638035abf19f303deebd9e861d384254 (diff)
Wed Aug 8 00:02:17 UTC 2012
Diffstat (limited to 'extra/lm_sensors')
-rw-r--r--extra/lm_sensors/PKGBUILD20
-rw-r--r--extra/lm_sensors/healthd9
-rw-r--r--extra/lm_sensors/healthd.rc18
-rw-r--r--extra/lm_sensors/healthd.service9
-rw-r--r--extra/lm_sensors/sensord.service9
5 files changed, 40 insertions, 25 deletions
diff --git a/extra/lm_sensors/PKGBUILD b/extra/lm_sensors/PKGBUILD
index 2d85f9060..0db6a3de1 100644
--- a/extra/lm_sensors/PKGBUILD
+++ b/extra/lm_sensors/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 162161 2012-06-22 12:59:02Z dreisner $
+# $Id: PKGBUILD 164818 2012-08-06 19:24:07Z eric $
# Maintainer: Eric BĂ©langer <eric@archlinux.org>
pkgname=lm_sensors
pkgver=3.3.2
-pkgrel=3
+pkgrel=4
pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring"
arch=('i686' 'x86_64')
url="http://www.lm-sensors.org/"
@@ -11,21 +11,24 @@ license=('GPL' 'LGPL')
depends=('perl' 'sysfsutils')
makedepends=('rrdtool')
optdepends=('rrdtool: for logging with sensord')
-backup=('etc/sensors3.conf' 'etc/conf.d/healthd' 'etc/conf.d/sensord')
+backup=('etc/sensors3.conf' 'etc/healthd.conf' 'etc/conf.d/sensord')
options=('!emptydirs')
source=(http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${pkgver}.tar.bz2{,.sig} \
sensors.rc fancontrol.rc healthd healthd.conf healthd.rc sensord.conf \
- sensord.rc fancontrol.service daemonarg.patch linux_3.0.patch)
+ sensord.rc fancontrol.service sensord.service healthd.service \
+ daemonarg.patch linux_3.0.patch)
sha1sums=('5d0f026ad763124e8c2ad733b6e1ad5e6473993d'
'a486d9fb6c5b0aff4520f6312106c67f5163f1cf'
'b2e664b9b87759991f02d0a1e8cac5e95098c0a5'
'a068ac0a3115a6191a487e11422506baa922b40a'
- '78b5cd36c3cb8e98b972cdd8c4a12687d79a79a8'
+ 'afaad558d2ad4732aa53b69afa23ccf37bc67ab1'
'6c4e8a2d89dd2fd3ca2f0f4f3b1230111e01b0fc'
- 'e662881f5d3f3f35a1bc97ba45d2c471dd28c37f'
+ 'de5a46afc39a77ae8721246a0223baf21a2d4c9c'
'de8d4d65406815c389f8a04e2a8508a1ae6749c8'
'72a60251d1d55a67307dab4105d9f3f01a080af4'
'7a4a4d1442aeeba0ba8aefb742a3ef187b593f4c'
+ 'eff43b4882d25dae7dd0b33eb2e33b0836a5cc51'
+ '9cc453eb0e9f9057227459cb07e74815383544bf'
'34241388c4001bfb6e49b7e10da1217e29a258d6'
'5662828085cdd981f0dc7cf8f79d3d6e2b72f50c')
@@ -34,6 +37,7 @@ build() {
sed -i -e 's|/etc/sysconfig|/etc/conf.d|' \
-e 's|/etc/init.d/lm_sensors|/etc/rc.d/sensors|' prog/{detect/sensors-detect,init/lm_sensors.service}
sed -i 's@\(/bin/systemctl\|/lib/systemd/system\)@/usr\1@g' prog/detect/sensors-detect
+ sed -i 's/EnvironmentFile=/EnvironmentFile=-/' prog/init/lm_sensors.service
patch -p1 < ../daemonarg.patch
patch -p0 < ../linux_3.0.patch
make PREFIX=/usr
@@ -48,8 +52,10 @@ package() {
install -D -m755 "${srcdir}/fancontrol.rc" "${pkgdir}/etc/rc.d/fancontrol"
install -D -m755 "${srcdir}/healthd" "${pkgdir}/usr/sbin/healthd"
install -D -m755 "${srcdir}/healthd.rc" "${pkgdir}/etc/rc.d/healthd"
- install -D -m644 "${srcdir}/healthd.conf" "${pkgdir}/etc/conf.d/healthd"
+ install -D -m644 "${srcdir}/healthd.conf" "${pkgdir}/etc/healthd.conf"
install -D -m755 "${srcdir}/sensord.rc" "${pkgdir}/etc/rc.d/sensord"
install -D -m644 "${srcdir}/sensord.conf" "${pkgdir}/etc/conf.d/sensord"
install -D -m644 "${srcdir}/fancontrol.service" "${pkgdir}/usr/lib/systemd/system/fancontrol.service"
+ install -D -m644 "${srcdir}/sensord.service" "${pkgdir}/usr/lib/systemd/system/sensord.service"
+ install -D -m644 "${srcdir}/healthd.service" "${pkgdir}/usr/lib/systemd/system/healthd.service"
}
diff --git a/extra/lm_sensors/healthd b/extra/lm_sensors/healthd
index 0315dd788..5ffed5681 100644
--- a/extra/lm_sensors/healthd
+++ b/extra/lm_sensors/healthd
@@ -4,7 +4,7 @@
# /usr/sbin/healthd
#
-. /etc/conf.d/healthd
+. /etc/healthd.conf
cmd="${ALARM_CMD}"
addr="${ADMIN_EMAIL}"
@@ -21,6 +21,13 @@ while [ $# -gt 0 ] ; do
esac
done
+case "${ALARM_RESET}" in
+ yes) /usr/bin/sensors > /dev/null
+ ;;
+ no) true
+ ;;
+esac
+
[ -n "${cmd}" ] && [ -n "$( which -- "${cmd%% *}" )" ] || \
[ -n "${addr}" ] || exit 1
diff --git a/extra/lm_sensors/healthd.rc b/extra/lm_sensors/healthd.rc
index 7bb79519f..f50f4a6f8 100644
--- a/extra/lm_sensors/healthd.rc
+++ b/extra/lm_sensors/healthd.rc
@@ -1,29 +1,13 @@
#!/bin/bash
-#
-# /etc/rc.d/healthd
-#
-
. /etc/rc.conf
. /etc/rc.d/functions
-. /etc/conf.d/healthd
-
-maybe_alarm_reset() {
- case "${ALARM_RESET}" in
- yes) /usr/bin/sensors > /dev/null
- ;;
- no) true
- ;;
- *) false
- esac
- return $?
-}
PID=$(pidof -x -o %PPID /usr/sbin/healthd)
case "${1}" in
start)
stat_busy "Starting Health Daemon"
- [ -z "${PID}" ] && maybe_alarm_reset && /usr/sbin/healthd &> /dev/null
+ [ -z "${PID}" ] && /usr/sbin/healthd &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
diff --git a/extra/lm_sensors/healthd.service b/extra/lm_sensors/healthd.service
new file mode 100644
index 000000000..b894fbb1f
--- /dev/null
+++ b/extra/lm_sensors/healthd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=A daemon which can be used to alert you in the event of a hardware health monitoring alarm
+
+[Service]
+PIDFile=/var/run/healthd.pid
+ExecStart=/usr/sbin/healthd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/extra/lm_sensors/sensord.service b/extra/lm_sensors/sensord.service
new file mode 100644
index 000000000..6d272f1ef
--- /dev/null
+++ b/extra/lm_sensors/sensord.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Sensor information logging daemon
+
+[Service]
+PIDFile=/var/run/sensord.pid
+ExecStart=/usr/sbin/sensord
+
+[Install]
+WantedBy=multi-user.target