summaryrefslogtreecommitdiff
path: root/rc/bin/fshalt
diff options
context:
space:
mode:
authoraiju <aiju@phicode.de>2012-06-29 16:55:48 +0200
committeraiju <aiju@phicode.de>2012-06-29 16:55:48 +0200
commit1eff3709b4b9e257e536f6a2c8926bc5c519a532 (patch)
treee5fa3b293b4a0cc874b8b0d60e61a49c971b38ca /rc/bin/fshalt
parent3500a4fafe60bdc617769cbbea90aaac97d3f28d (diff)
acpi shutdown
Diffstat (limited to 'rc/bin/fshalt')
-rwxr-xr-xrc/bin/fshalt11
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