Anonymous - 2012-05-21

Prevent acidental shutdowns on headless solutions:
Should be default config !

Add this to the end of  /etc/acpi/

# chaveiro mod
#Check for powerbutton pressings
# 1s/(60sXmin)=0.0166666667 min
s=2 # seconds for second press

last=$(find /tmp/powerbtn -type f -amin -$ns)
if test "$last" != ""; then
    rm -f /tmp/powerbtn
    shutdown -k -h now "Power button pressed"
    touch /tmp/powerbtn
    shutdown -k -h now "Press power button again in $s seconds to accept."  
# If all else failed, just initiate a plain shutdown.
#/sbin/shutdown -h now "Power button pressed"

Add to sources as desired:)