The s6-poweroff program
s6-poweroff sends a signal to process 1 in order to power off the machine;
or, with the -f option, it performs an immediate hard shutdown.
s6-poweroff [ -h | -p | -r ] [ -f ]
- s6-poweroff sends a signal to process 1.
- It then exits 0.
- -h : halt. The command will order a halt (i.e. the system will
be shut down, but the power will remain up), which means
sending a SIGUSR2 to process 1.
- -p : poweroff. The command will order a power off, which means
sending a SIGUSR1 to process 1. This is the default.
- -r : reboot. The command will order a reboot, which means
sending a SIGINT to process 1.
- -f : force. The command will not send any signal to process 1;
it will just sync the filesystems then tell the kernel to halt, poweroff or reboot.
s6-reboot -f or s6-poweroff -f should be the last program
executed in the lifetime of a machine, at the end of the shutdown script called
by process 1 when it receives a signal telling it to shut down.