]> git.pld-linux.org Git - packages/fnfx.git/blob - fnfx.init
- rel 5 to rebuild with UTF-8 descriptions
[packages/fnfx.git] / fnfx.init
1 #!/bin/sh
2 #
3 # chkconfig: 2345 88 12
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
20 RETVAL=0
21
22 start() {
23         msg_starting "Toshiba function key daemon (fnfxd): "
24         daemon /usr/sbin/fnfxd
25         touch /var/lock/subsys/fnfxd
26 }
27
28 stop() {
29         msg_stopping "Toshiba function key daemon (fnfxd): "
30         killproc fnfxd
31         RETVAL=$?
32         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fnfxd
33 }
34
35 dostatus() {
36         status fnfxd
37         RETVAL=$?
38 }
39
40 restart() {
41         stop
42         start
43         RETVAL=$?
44 }
45
46 condrestart() {
47         [ -e /var/lock/subsys/fnfxd ] && restart || :
48 }
49
50 # See how we were called.
51 case "$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   *)
68         msg_usage "$0 {start|stop|status|restart|reload|condrestart}"
69         exit 1
70 esac
71
72 exit $RETVAL
This page took 0.086296 seconds and 3 git commands to generate.