Difference between revisions of "Code/ibm-fancontrol.init"

From ThinkWiki
Jump to: navigation, search
 
(Everything in a pre block. GPLv2-only? Sad!)
 
Line 1: Line 1:
 +
<pre>
 
#!/sbin/runscript
 
#!/sbin/runscript
 
# 2005 Gilbert Tiefengruber
 
# 2005 Gilbert Tiefengruber
Line 27: Line 28:
 
         eend ${?}
 
         eend ${?}
 
}
 
}
 +
</pre>

Latest revision as of 09:21, 11 April 2025

#!/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 ${?}
}