]> git.pld-linux.org Git - packages/fnfx.git/blame - fnfx.init
- rel 5 to rebuild with UTF-8 descriptions
[packages/fnfx.git] / fnfx.init
CommitLineData
7da20cfc 1#!/bin/sh
2#
ce1d0c2d 3# chkconfig: 2345 88 12
7da20cfc 4# description: apmiser is used for monitoring system usage when on batteries, \
5# scaling the CPU voltage down via tpctl when idle to save power.
6# processname: apmiser
7
8# We can't run without acpi:
9[ -e /proc/acpi ] || exit
10
11# If toshiba_acpi doesn't exist, try loading the module...
12[ -e /proc/acpi/toshiba ] || /sbin/modprobe toshiba_acpi &>/dev/null
13
14# Don't bother if /proc/acpi/toshiba still doesn't exist
15[ -e /proc/acpi/toshiba ]|| exit
16
17# Source function library.
18. /etc/init.d/functions
19
20RETVAL=0
21
22start() {
9a2ecf8e 23 msg_starting "Toshiba function key daemon (fnfxd): "
7da20cfc 24 daemon /usr/sbin/fnfxd
25 touch /var/lock/subsys/fnfxd
7da20cfc 26}
27
28stop() {
9a2ecf8e 29 msg_stopping "Toshiba function key daemon (fnfxd): "
7da20cfc 30 killproc fnfxd
31 RETVAL=$?
32 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fnfxd
7da20cfc 33}
34
35dostatus() {
36 status fnfxd
37 RETVAL=$?
38}
39
40restart() {
41 stop
42 start
43 RETVAL=$?
44}
45
46condrestart() {
47 [ -e /var/lock/subsys/fnfxd ] && restart || :
48}
49
50# See how we were called.
51case "$1" in
52 start)
53 start
54 ;;
55 stop)
56 stop
57 ;;
58 status)
59 dostatus
60 ;;
61 restart|reload)
62 restart
63 ;;
64 condrestart)
65 condrestart
66 ;;
67 *)
9a2ecf8e 68 msg_usage "$0 {start|stop|status|restart|reload|condrestart}"
7da20cfc 69 exit 1
70esac
71
72exit $RETVAL
This page took 0.063435 seconds and 4 git commands to generate.