]> git.pld-linux.org Git - packages/acpid.git/blame - acpid.init
- modprobe for button, not system
[packages/acpid.git] / acpid.init
CommitLineData
94f6e9a1
PG
1#!/bin/sh
2#
3# acpid Starts the acpi daemon
4#
5# chkconfig: 345 44 56
6# description: Listen and dispatch ACPI events from the kernel
7# processname: acpid
8#
9# pidfile: /var/run/acpid.pid
10
11# Source function library.
12. /etc/rc.d/init.d/functions
13
14# Configuration file.
15. /etc/sysconfig/acpid
16
94f6e9a1
PG
17
18RETVAL=0
19
20# See how we were called.
21case "$1" in
22 start)
23 # Start daemons.
24 if [ ! -f /var/lock/subsys/acpid ]; then
9f8958e5 25 if [ ! -f /proc/acpi/event ]; then
0b34fe2c 26 modprobe ospm_button
9f8958e5
PG
27 fi
28 msg_starting acpid $PROGRAM_ARGS
29 daemon acpid
30 RETVAL=$?
31 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid
94f6e9a1
PG
32 else
33 msg_already_running acpid
9f8958e5 34 fi
94f6e9a1
PG
35 ;;
36 stop)
37 # Stop daemons.
38 if [ -f /var/lock/subsys/acpid ]; then
39 msg_stopping acpid
40 killproc acpid
41 rm -f /var/lock/subsys/acpid >/dev/null 2>&1
42 else
43 msg_not_running acpid
44 exit 1
45 fi
46 ;;
47 reload)
7c0b3eb3
PG
48 if [ -f /var/lock/subsys/acpid ]; then
49 msg_reloading acpid
50 killproc acpid -HUP
51 else
52 msg_not_running acpid
53 exit 1
54 fi
94f6e9a1
PG
55 ;;
56 restart)
57 $0 stop
58 $0 start
59 ;;
60 status)
61 status acpid
62 ;;
63 *)
64 msg_Usage "$0 {start|stop|restart|reload|status}"
65 exit 1
66esac
This page took 0.047236 seconds and 4 git commands to generate.