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
24 # See how we were called.
28 if [ ! -f /var/lock/subsys/acpid ]; then
29 if [ ! -d /proc/acpi/button ]; then
33 if [ "$(kernelverser)" -lt "002006" ] && is_yes "$MODPROBE_OSPM_SYSTEM"; then
34 _modprobe single ospm_system
36 # Load additional modules:
37 if [ -n "$LAPTOP_MODULES" ]; then
38 for i in $LAPTOP_MODULES; do
42 if [ -n "$VARIOUS_MODULES" ]; then
43 for i in $VARIOUS_MODULES; do
47 # Determine if it's ASUS or TOSHIBA laptop
48 if is_yes "$ASUS_LAPTOP"; then
50 elif is_yes "$TOSHIBA_LAPTOP"; then
51 _modprobe toshiba_acpi
52 elif is_yes "$IBM_LAPTOP"; then
56 msg_starting acpid $PROGRAM_ARGS
59 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid
61 msg_already_running acpid
66 if [ -f /var/lock/subsys/acpid ]; then
69 rm -f /var/lock/subsys/acpid >/dev/null 2>&1
75 if [ -f /var/lock/subsys/acpid ]; then
80 msg_not_running acpid >&2
94 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"