#!/bin/sh # # chkconfig: 2345 88 12 # description: apmiser is used for monitoring system usage when on batteries, \ # scaling the CPU voltage down via tpctl when idle to save power. # processname: apmiser # We can't run without acpi: [ -e /proc/acpi ] || exit # If toshiba_acpi doesn't exist, try loading the module... [ -e /proc/acpi/toshiba ] || /sbin/modprobe toshiba_acpi &>/dev/null # Don't bother if /proc/acpi/toshiba still doesn't exist [ -e /proc/acpi/toshiba ]|| exit # Source function library. . /etc/init.d/functions RETVAL=0 start() { msg_starting "Toshiba function key daemon (fnfxd): " daemon /usr/sbin/fnfxd touch /var/lock/subsys/fnfxd } stop() { msg_stopping "Toshiba function key daemon (fnfxd): " killproc fnfxd RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fnfxd } dostatus() { status fnfxd RETVAL=$? } restart() { stop start RETVAL=$? } condrestart() { [ -e /var/lock/subsys/fnfxd ] && restart || : } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) dostatus ;; restart|reload) restart ;; condrestart) condrestart ;; *) msg_usage "$0 {start|stop|status|restart|reload|condrestart}" exit 1 esac exit $RETVAL