S6-LINUX-INIT-HPR(8)

NAME
s6-linux-init-hpr - trigger the software shutdown procedure or perform an immediate hardware shutdown

SYNOPSIS
s6-linux-init-hpr [-f] [-h | -p | -r] [-n] [-d | -w] [-W] [-i]

DESCRIPTION
s6-linux-init-hpr triggers the software shutdown procedure, or, with the -f option, performs an immediate hardware shutdown. It is normally invoked through halt, poweroff or reboot wrappers created by s6-linux-init-maker(8).

If the -f option is present, the system is stopped or rebooted immediately.

Else, the machine's shutdown procedure is started.

The command exits 0; the shutdown procedure happens asynchronously.

This interface is the traditional sysvinit interface for the halt, poweroff and reboot programs. s6-linux-init-hpr must always be called with one of the -h, -p or -r options.

When an administrator runs s6-linux-init-maker(8), the resulting directory has a bin/ subdirectory that contains halt, poweroff and reboot scripts that call s6-linux-init-hpr with the relevant option. The contents of this bin/ subdirectory should then be copied by the administrator into /sbin for full interface compatibility with sysvinit.

OPTIONS

-f  Force. The command will not trigger a clean shutdown procedure; it will just sync the filesystems then tell the kernel to immediately halt, poweroff or reboot. This should be the last step in the lifetime of the machine.

-h  Halt. The system will be shut down, but the power will remain up.

-p  Poweroff. The system will be shut down and the power turned off.

-r  Reboot. The system will reboot.

-n  Do not call sync(2) before the hardware shutdown. The default is to sync, just in case. This option is only relevant when combined with -f; without it, it has no effect.

-d  Do not write a wtmp shutdown entry.

-w  Only write a wtmp shutdown entry; do not actually shut down the system.

-W  Do not send a wall(1) message to users before shutting down the system. Some other implementations of the halt, poweroff and reboot commands use the ‘--no-wall’ long option to achieve this.

-i  Interactive confirmation request. The command needs to be launched in a terminal, and will prompt the user to type the ( short) hostname of the machine to be shut down. On mismatch, the command will abort. The point is to avoid inadvertently rebooting a remote machine in an ssh session.

EXIT STATUS

0   Success.

100 Permanent error ( such as a misuse).

111 Temporary error ( such as a system call failure).

SEE ALSO
s6-linux-init-echo(1), s6-linux-init-overview(7), s6-linux-init-quickstart(7), s6-linux-init-why(7), s6-linux-init(8), s6-linux-init-logouthookd(8), s6-linux-init-maker(8), s6-linux-init-nuke(8), s6-linux-init-shutdown(8), s6-linux-init-shutdownd(8), s6-linux-init-telinit(8), s6-linux-init-umountall(8)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-linux-init/s6-linux-init-hpr.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)