easuter has provided some scripts.
/etc/acpi/acpi_handler.sh
#!/bin/sh
# Default acpi script that takes an entry for all actions
IFS=${IFS}/
set $@
LIDSTATE=$(/bin/sed -ne "/state:/{s/^state:[ ]*\([a-zA-Z]*\)$/\1/p;q}" \
/proc/acpi/button/lid/LID/state)
case "$1" in
button)
case "$2" in
power)
if [ "$LIDSTATE" == "open" ]; then
/usr/sbin/presusp
hibernate -F /etc/hibernate/ram.conf
elif [ "$LIDSTATE" == "closed" ]; then
hibernate -F /etc/hibernate/ususpend-ram.conf
fi
;;
lid)
if [ "$LIDSTATE" == "closed" ]; then
/usr/sbin/presusp
hibernate -F /etc/hibernate/ram.conf
elif [ "$LIDSTATE" == "open" ]; then
hibernate -F /etc/hibernate/ususpend-ram.conf
fi
;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
/etc/rc.d/rc.acpid
#!/bin/sh
# Start/stop/restart acpid.
# Start acpid:
acpid_start() {
if [ -x /usr/sbin/acpid -a -d /proc/acpi ]; then
echo "Starting ACPI daemon: /usr/sbin/acpid"
/usr/sbin/acpid
fi
}
# Stop acpid:
acpid_stop() {
killall acpid
}
# Restart acpid:
acpid_restart() {
acpid_stop
sleep 1
acpid_start
}
case "$1" in
'start')
acpid_start
;;
'stop')
acpid_stop
;;
'restart')
acpid_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
after adding those and setting them executable you will need to add acpid to /etc/rc.d/rc.M like this
## Hardware initialisation
echocl "Initializing hardware" cyan
for RC in modules pnp acpid serial parallel alsa cdrom samba dbus; do
you also need the hibernate scripts