]> git.pld-linux.org Git - packages/fnfx.git/blame - fnfx.init
*** empty log message ***
[packages/fnfx.git] / fnfx.init
CommitLineData
7da20cfc 1#!/bin/sh
2#
3# chkconfig: 2345 27 73
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() {
23 gprintf "Starting up Toshiba function key daemon (fnfxd): "
24 daemon /usr/sbin/fnfxd
25 touch /var/lock/subsys/fnfxd
26 echo
27}
28
29stop() {
30 gprintf "Shutting down Toshiba function key daemon (fnfxd): "
31 killproc fnfxd
32 RETVAL=$?
33 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fnfxd
34 echo
35}
36
37dostatus() {
38 status fnfxd
39 RETVAL=$?
40}
41
42restart() {
43 stop
44 start
45 RETVAL=$?
46}
47
48condrestart() {
49 [ -e /var/lock/subsys/fnfxd ] && restart || :
50}
51
52# See how we were called.
53case "$1" in
54 start)
55 start
56 ;;
57 stop)
58 stop
59 ;;
60 status)
61 dostatus
62 ;;
63 restart|reload)
64 restart
65 ;;
66 condrestart)
67 condrestart
68 ;;
69 *)
70 gprintf "Usage: $0 {start|stop|status|restart|reload|condrestart}\n"
71 exit 1
72esac
73
74exit $RETVAL
This page took 0.13593 seconds and 4 git commands to generate.