]> git.pld-linux.org Git - packages/fnfx.git/commitdiff
- init
authorpbern <pbern@pld-linux.org>
Sun, 10 Oct 2004 11:16:42 +0000 (11:16 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    fnfx.init -> 1.1

fnfx.init [new file with mode: 0644]

diff --git a/fnfx.init b/fnfx.init
new file mode 100644 (file)
index 0000000..c07f9e2
--- /dev/null
+++ b/fnfx.init
@@ -0,0 +1,74 @@
+#!/bin/sh
+#
+# chkconfig: 2345 27 73
+# 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() {
+       gprintf "Starting up Toshiba function key daemon (fnfxd): "
+       daemon /usr/sbin/fnfxd
+       touch /var/lock/subsys/fnfxd
+       echo
+}
+
+stop() {
+       gprintf "Shutting down Toshiba function key daemon (fnfxd): "
+       killproc fnfxd
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fnfxd
+       echo
+}
+
+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
+       ;;
+  *)
+       gprintf "Usage: $0 {start|stop|status|restart|reload|condrestart}\n"
+       exit 1
+esac
+
+exit $RETVAL
This page took 0.059383 seconds and 4 git commands to generate.