From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Tue, 22 Oct 2013 04:58:46 -0400 To: 9fans@9fans.net Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] safe power button Topicbox-Message-UUID: 8814ddcc-ead8-11e9-9d60-3106f5b1d025 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