aboutsummaryrefslogtreecommitdiffstats
path: root/main/lm_sensors
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-05-14 08:46:10 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-05-21 13:40:20 +0000
commitfece1d19448dbd3a56fd8ac70443116187141848 (patch)
treeafe0492c624fbeda801f9fbe17ade794beb0943f /main/lm_sensors
parent37c2ebe2c596846033254928cee8cadd4b6709c6 (diff)
downloadaports-fece1d19448dbd3a56fd8ac70443116187141848.tar.bz2
aports-fece1d19448dbd3a56fd8ac70443116187141848.tar.xz
main/lm_sensors: fix init.d to not check for MODULES_0
ref #4103 fix is from https://bugs.gentoo.org/show_bug.cgi?id=480018 We fix our init.d script for compatibility reasons (cherry picked from commit ae1b20f204ee9e9e6bfc3f9787637b5c8820b624)
Diffstat (limited to 'main/lm_sensors')
-rw-r--r--main/lm_sensors/APKBUILD8
-rw-r--r--main/lm_sensors/lm_sensors.initd53
2 files changed, 27 insertions, 34 deletions
diff --git a/main/lm_sensors/APKBUILD b/main/lm_sensors/APKBUILD
index 0f166b9d6e..7421a8c027 100644
--- a/main/lm_sensors/APKBUILD
+++ b/main/lm_sensors/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lm_sensors
pkgver=3.3.5
-pkgrel=4
+pkgrel=5
pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring."
url="http://www.lm-sensors.org/"
arch="all"
@@ -78,20 +78,20 @@ md5sums="da506dedceb41822e64865f6ba34828a lm_sensors-3.3.5.tar.bz2
8e508dcb4e35c2b05154ea0efae08a19 sensors-detect-alpine.patch
9411b5410420df8251c6e6c9c958fd89 musl-fix-includes.patch
a0d35e054e9b0abb286c71f2212515f7 fancontrol.initd
-d117f84fddb226ac877489904d2187ab lm_sensors.initd
+c6f63b21f866b2141f2f0eefce933bd6 lm_sensors.initd
82e075236a61334abb3adf46280380d3 sensord.confd
8e4b68b7cf6d3f29a320af2dc2f5c1eb sensord.initd"
sha256sums="5dae6a665e1150159a93743c4ff1943a7efe02cd9d3bb12c4805e7d7adcf4fcf lm_sensors-3.3.5.tar.bz2
8a18ea7ebea7b85f8ef518adba4445f08002b5a749b74bae174fc6496c818b5b sensors-detect-alpine.patch
e9bf572221a262bb53cefc86bea4d3d957a1e7962e6b3c0c2917fb3945bb7545 musl-fix-includes.patch
1b108ed9e856bd1defdfe94ee6d299c50cc09bac1b70f865d83542ac7ae7c98c fancontrol.initd
-ad1dfb045caab9092da546f2c7443a5bb1817441cefa6c915a21c8346a1590bb lm_sensors.initd
+efa7e79859b19b40a8fde672f24246c17257b76ca0c76588cef170034759d14d lm_sensors.initd
02230edf5efbb0a4de3840cd76f9ebf431c57a246fa7388e9dbeb0fe26fe7b8d sensord.confd
756ca3a1e138d10dd73246df3c3ff174330f351e7c4ca15e4bf888a0e3bb162a sensord.initd"
sha512sums="0874084c3dd40b93ed05e1955f76e35e78ac3ac2343341d8ab5412fd941ea300b3a4b1320bec3a5bfb07309e82f42cc5dac0a728cdfddac4053d4fdb96dc12e7 lm_sensors-3.3.5.tar.bz2
794cf2aaa2a9e809c6b67f4c888a89064bba3e5b9333a9f0101a92372c25012e506fa48e86523f57cf30e5c2a808bc38058fd8640c870ea6b48faab44794cfbb sensors-detect-alpine.patch
333751cb580c94f2d32ef5520d2f2acc0ef7e1cd4a6390ea75cae4c755fbdfcade1805c979ba3319905f1267bdc120a6746e6f70d89e0c72a8c2faefd34a9e79 musl-fix-includes.patch
04756c3844033dc7897e1348181140a43f8470c1bb863f1524b21bbe6be2f13fbf17ac3a68270c96a70d8c148124fea569d1ef75619bbe383e15ec705ea18b21 fancontrol.initd
-fc7a05e256da4d6f9bdf65c6d4dc1666c4bee141cfaa452d201443cd7287f1ac915a4b009b625ce0f85004f68e8e49fa92ac6650e63be56dacde17b8b43f9615 lm_sensors.initd
+9744b109948f3be0f01e9f31a54835f1f89d2696d764e4bcc558c02bcc47202413adac9e2230e21c581b6fe80979198b8335afbb9556873f867bdfe81795b5d5 lm_sensors.initd
a77d81ab7ded085ba19e4c637e93268f889ccb8ce9e008a210ae135cb6e2140be07e5d455cf7fcc1084fd57cfbfb3f2bb37207123aebe9566f78b5183806fd7d sensord.confd
9ba515ce646a45c4604ca5be266e9caf2a0742cc6c3742301c302495ff3d63f1d58db54d2d9e898ac7ced0e5cf7c516b9ee6653e7940efc60eb333b0c0dafa36 sensord.initd"
diff --git a/main/lm_sensors/lm_sensors.initd b/main/lm_sensors/lm_sensors.initd
index d8835ece74..f4aabda608 100644
--- a/main/lm_sensors/lm_sensors.initd
+++ b/main/lm_sensors/lm_sensors.initd
@@ -10,8 +10,8 @@ checkconfig() {
fi
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"
+ if [ -z "${HWMON_MODULES}" ]; then
+ eerror "HWMON_MODULES is not set in /etc/conf.d/lm_sensors, try running sensors-detect"
return 1
fi
fi
@@ -46,18 +46,17 @@ start() {
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
+ for module in ${BUS_MODULES}; do
+ ebegin " Loading ${module}"
+ modprobe ${module} >/dev/null 2>&1
+ eend $?
+ done
+
+ for module in ${HWMON_MODULES}; do
+ ebegin " Loading ${module}"
+ modprobe ${module} >/dev/null 2>&1
+ eend $?
+ done
fi
if [ "${INITSENSORS}" = "yes" ]; then
@@ -78,23 +77,17 @@ stop() {
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
+ for module in ${HWMON_MODULES}; do
+ ebegin " Unloading ${module}"
+ rmmod ${module} >/dev/null 2>&1
+ eend $?
+ 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
+ for module in ${BUS_MODULES}; do
+ ebegin " Unloading ${module}"
+ rmmod ${module} >/dev/null 2>&1
+ eend $?
+ done
if [ -e /proc/sys/dev/sensors ] ; then
ebegin " Unloading i2c-proc"