command script run at system shutdown
When the system is shut down using the
signalled to do so, or when a keyboard-requested halt is issued (if the
architecture supports it),
is invoked with
the argument “shutdown”. This document details the actions taken
in such an
Firstly it saves random data for reseeding the kernel random number generator
during the next boot. It then stops any daemons defined in the
by passing them the
. The administrator should place
in this file any commands they wish to have executed during shutdown.
Finally, all carp(4)
interfaces are brought down and then the system shuts down.
single-user mode it will also run the first part of shutdown (saving random
data), though not the latter.