code: plan9front

ref: 5622b0bbd878dbc34045cc6fd37cffa64461eabe
dir: /sys/man/8/fshalt/

View raw version
.TH FSHALT 8
.SH NAME
fshalt, scram, reboot \- halt any local file systems and optionally shut down or reboot the system
.SH SYNOPSIS
.B fshalt
[
.B -r
[
.I kernelpath
]
]
.br
.B reboot
[
.I kernelpath
]
.br
.B scram
.SH DESCRIPTION
.I Fshalt
syncs and halts all local
.IR cwfs (4)
and
.IR hjfs (4)
servers.
If given
.BR -r ,
.I fshalt
will then reboot the machine,
optionally starting
.IR kernelpath .
Else it will try to shut down the machine through
.I /dev/pmctl
(if available) or invoke
.IR scram .
The halting and rebooting is done by copying all necessary
commands into a
.IR ramfs (4)
file system and changing directory there before attempting to halt
file systems,
so this will work even on standalone machines with their roots on
local file systems.
.PP
.I Reboot
restarts the machine it is invoked on. If an optional
.I kernelpath
is specified then the machine will load and start that
kernel directly instead of returning to the system rom. (see
.IR cons (3)).
.PP
.I Scram
shuts down the machine it is invoked on by writing
.I power off
to
.BR /dev/pmctl .
.SH SOURCE
.B /rc/bin/fshalt
.br
.B /rc/bin/reboot
.br
.B /rc/bin/scram
.SH SEE ALSO
.IR acpi (8),
.IR cons (3),
.IR reboot (8)
.SH BUGS
On standalone machines, it will be impossible to do anything if scram fails
after invoking bare
.IR fshalt .

.I Scram
falls back to trying
.I aux/acpi
if writing to
.B /dev/pmctl
fails.

.SH HISTORY
.I Scram
first appeared in 9front (May, 2011).