i thought this was a fun little hack with acpi, the nix kernel, and
cooperative hardware.

don't you hate it when you hit the power button and that moment of
doubt creaps in?  did i halt the system ... or not.  perhaps it hung?

solution.  teach the power button to just take care of this stuff.
here's the script, which requires to very recent patches to 9atom:

        dial/expect powerbutton< /dev/acpievent && 
                echo fshalt starting .... &&
                fshalt -h

fshalt -h echos "power off" into /dev/acpictl.  

- erik

Reply via email to