diff options
author | aiju <aiju@phicode.de> | 2012-06-29 16:55:48 +0200 |
---|---|---|
committer | aiju <aiju@phicode.de> | 2012-06-29 16:55:48 +0200 |
commit | 1eff3709b4b9e257e536f6a2c8926bc5c519a532 (patch) | |
tree | e5fa3b293b4a0cc874b8b0d60e61a49c971b38ca /rc/bin/fshalt | |
parent | 3500a4fafe60bdc617769cbbea90aaac97d3f28d (diff) |
acpi shutdown
Diffstat (limited to 'rc/bin/fshalt')
-rwxr-xr-x | rc/bin/fshalt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/rc/bin/fshalt b/rc/bin/fshalt index c6bf8c854..2847e6a6c 100755 --- a/rc/bin/fshalt +++ b/rc/bin/fshalt @@ -38,9 +38,12 @@ for (i in $k){ # for scram, don't scram other systems bind -b '#P' /dev -if (test -e '#P'/apm) - if (! ~ $reboot yes) +if(! ~ $reboot yes){ + if (test -e '#P'/apm) scram=yes + if (test -e '#P'/acpitbls -a -e '#P'/iow) + scram=yes +} # halting (binaries we run can't be on the fs we're halting) ramfs @@ -85,8 +88,10 @@ fn x { echo rebooting... echo reboot >'#c/reboot' } - if (~ $scram yes) + if (~ $scram yes){ scram + echo 'It''s now safe to turn off your computer' + } } x |