3 # acpid Starts the acpi daemon
6 # description: Listen and dispatch ACPI events from the kernel
9 # pidfile: /var/run/acpid.pid
11 # Source function library.
12 . /etc/rc.d/init.d/functions
14 # Initial values (just in case):
21 . /etc/sysconfig/acpid
25 if [ -f /var/lock/subsys/acpid ]; then
26 msg_already_running "ACPI Event Daemon"
30 if [ ! -d /proc/acpi/button ]; then
34 # Load additional modules:
35 if [ -n "$LAPTOP_MODULES" ]; then
36 for i in $LAPTOP_MODULES; do
40 if [ -n "$VARIOUS_MODULES" ]; then
41 for i in $VARIOUS_MODULES; do
45 # Determine if it's ASUS or TOSHIBA laptop
46 if is_yes "$ASUS_LAPTOP"; then
48 elif is_yes "$TOSHIBA_LAPTOP"; then
49 modprobe -s toshiba_acpi
53 msg_starting "ACPI Event Daemon"
54 daemon /usr/sbin/acpid $PROGRAM_ARGS
56 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid
61 if [ ! -f /var/lock/subsys/acpid ]; then
62 msg_not_running "ACPI Event Daemon"
66 msg_stopping "ACPI Event Daemon"
68 rm -f /var/lock/subsys/acpid >/dev/null 2>&1
72 if [ ! -f /var/lock/subsys/acpid ]; then
73 msg_not_running "ACPI Event Daemon"
83 # See how we were called.
99 if [ -f /var/lock/subsys/acpid ]; then
100 msg_reloading "ACPI Event Daemon"
104 msg_not_running "ACPI Event Daemon"
112 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"