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 if [ ! -d /proc/acpi/button ]; then
27 modprobe -s ospm_button
30 if [ "$(kernelverser)" -lt "002006" ] && is_yes "$MODPROBE_OSPM_SYSTEM"; then
31 modprobe -s ospm_system
33 # Load additional modules:
34 if [ -n "$LAPTOP_MODULES" ]; then
35 for i in $LAPTOP_MODULES; do
39 if [ -n "$VARIOUS_MODULES" ]; then
40 for i in $VARIOUS_MODULES; do
44 # Determine if it's ASUS or TOSHIBA laptop
45 if is_yes "$ASUS_LAPTOP"; then
47 elif is_yes "$TOSHIBA_LAPTOP"; then
48 modprobe -s toshiba_acpi
49 elif is_yes "$IBM_LAPTOP"; then
53 msg_starting acpid $PROGRAM_ARGS
54 daemon /usr/sbin/acpid
56 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid
58 msg_already_running acpid
64 if [ -f /var/lock/subsys/acpid ]; then
67 rm -f /var/lock/subsys/acpid >/dev/null 2>&1
74 # See how we were called.
87 if [ -f /var/lock/subsys/acpid ]; then
100 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"