diff options
author | Brandon Low <lostlogic@gentoo.org> | 2003-01-08 17:44:41 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@gentoo.org> | 2003-01-08 17:44:41 +0000 |
commit | 0f0fa1446187171b43b118d7e9bb661f7d975aa9 (patch) | |
tree | bc71681caf8f222e7090f9d19ee7d643a1e36c10 /sys-apps/lm_sensors | |
parent | n (diff) | |
download | gentoo-2-0f0fa1446187171b43b118d7e9bb661f7d975aa9.tar.gz gentoo-2-0f0fa1446187171b43b118d7e9bb661f7d975aa9.tar.bz2 gentoo-2-0f0fa1446187171b43b118d7e9bb661f7d975aa9.zip |
repair init script
Diffstat (limited to 'sys-apps/lm_sensors')
-rw-r--r-- | sys-apps/lm_sensors/files/rc_lm_sensors | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys-apps/lm_sensors/files/rc_lm_sensors b/sys-apps/lm_sensors/files/rc_lm_sensors index e69de29bb2d1..697b572888a9 100644 --- a/sys-apps/lm_sensors/files/rc_lm_sensors +++ b/sys-apps/lm_sensors/files/rc_lm_sensors @@ -0,0 +1,30 @@ +#!/sbin/runscript + +start() { + if ! [ -f /etc/sysconfig/lm_sensors ] ; then + eerror "/etc/sysconfig/lm_sensors does not exist" + return 1 + fi + + . /etc/sysconfig/lm_sensors + + ebegin "Loading lm_sensors modules" + eend $? + if ! [ -e /proc/sys/dev/sensors ] ; then + ebegin " Loading i2c-proc" + modprobe i2c-proc &>/dev/null + eend $? + fi + [ -e /proc/sys/dev/sensors ] || return 1 + + modules=`grep \^MODULE_ /etc/sysconfig/lm_sensors |wc -l` + i=1 + while [ ${i} -le ${modules} ] ; do + module=`eval echo '$'MODULE_${i}` + ebegin " Loading ${module}" + modprobe ${module} &>/dev/null + eend $? + i=$((i+1)) + done + return 0 +} |