#!/sbin/runscript
# 2005 Gilbert Tiefengruber
# Distributed under the terms of the GNU General Public License v2
# IBM Fancontrol init script for IBM Thinkpad laptops (tested with R50)
# This init script was written for gentoo 2005.1, kernel 2.6.12
# You need the ibm_acpi kernel module version 0.11 or greater
# load the module with experimental=1 to enable the fan controls
depend() {
need localmount
}
checkconfig() {
if [ ! -e /proc/acpi/ibm/fan ]; then
eerror "The ibm_acpi module must be loaded with (experimental=1)"
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting ibm-fancontrold"
start-stop-daemon --quiet -p /var/run/ibm-fancontrold.pid -m -b --start -a /usr/sbin/ibm-fancontrold
eend ${?}
}
stop() {
ebegin "Stopping ibm-fancontrold"
start-stop-daemon --stop --quiet -p /var/run/ibm-fancontrold.pid
eend ${?}
}