#!/bin/sh
# Default acpi script that takes an entry for all actions

set $*

case "$1" in
	button/power)  /sbin/init 0
		       ;;
	button/sleep)  
	     /sbin/splash -s -u 62 /etc/bootsplash/themes/Linux/config/bootsplash-1024x768.cfg
	     echo 424 582 506 30 15 > /proc/sys/kernel/splash_progress
             /usr/local/sbin/hibernate
	     /sbin/splash -s -u 62
             at now <<EOF
/sbin/modprobe ohci1394
sleep 1
/sbin/modprobe -r ohci1394
sleep 1
/sbin/modprobe ohci1394
EOF
		       ;;
	button/lid)    
	     echo 424 582 506 30 15 > /proc/sys/kernel/splash_progress
	     /usr/local/sbin/hibernate
	     /sbin/splash -s -u 62
             at now <<EOF
/sbin/modprobe ohci1394
sleep 1
/sbin/modprobe -r ohci1394
sleep 1
/sbin/modprobe ohci1394
EOF
		       ;;
	*)
		logger "ACPI group $1 / action $2 is not defined"
		;;
esac
