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
31 modprobe -s ospm_button
34 if [ "$(kernelverser)" -lt "002006" ] && is_yes "$MODPROBE_OSPM_SYSTEM"; then
35 modprobe -s ospm_system
37 # Load additional modules:
38 if [ -n "$LAPTOP_MODULES" ]; then
39 for i in $LAPTOP_MODULES; do
43 if [ -n "$VARIOUS_MODULES" ]; then
44 for i in $VARIOUS_MODULES; do
48 # Determine if it's ASUS or TOSHIBA laptop
49 if is_yes "$ASUS_LAPTOP"; then
51 elif is_yes "$TOSHIBA_LAPTOP"; then
52 modprobe -s toshiba_acpi
53 elif is_yes "$IBM_LAPTOP"; then
58 msg_starting "ACPI Event Daemon"
59 daemon /usr/sbin/acpid $PROGRAM_ARGS
61 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid
66 if [ ! -f /var/lock/subsys/acpid ]; then
67 msg_not_running "ACPI Event Daemon"
71 msg_stopping "ACPI Event Daemon"
73 rm -f /var/lock/subsys/acpid >/dev/null 2>&1
77 if [ ! -f /var/lock/subsys/acpid ]; then
78 msg_not_running "ACPI Event Daemon"
88 # See how we were called.
104 if [ -f /var/lock/subsys/acpid ]; then
105 msg_reloading "ACPI Event Daemon"
109 msg_not_running "ACPI Event Daemon"
117 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"