diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-03-02 09:41:24 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-03-02 09:41:24 +0000 |
commit | 23fba266a9454ee6ca095b7f6eccf523f6526607 (patch) | |
tree | 7350fdaba49b1529a13d50f6396aea35f340954d /doc/s6-linux-init-halt.html | |
parent | 54d0dc0990f13a86680fa55c623f0570853749ac (diff) | |
download | s6-linux-init-23fba266a9454ee6ca095b7f6eccf523f6526607.tar.xz |
Save pending changes in 1.0.0.0 branch
Diffstat (limited to 'doc/s6-linux-init-halt.html')
-rw-r--r-- | doc/s6-linux-init-halt.html | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/doc/s6-linux-init-halt.html b/doc/s6-linux-init-halt.html new file mode 100644 index 0000000..0f68995 --- /dev/null +++ b/doc/s6-linux-init-halt.html @@ -0,0 +1,102 @@ +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-init: the s6-linux-init-halt program</title> + <meta name="Description" content="s6-linux-init: the s6-linux-init-halt program" /> + <meta name="Keywords" content="s6 linux init administration root utilities shutdown halt poweroff reboot" /> + <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-init</a><br /> +<a href="//skarnet.org/software/">Software</a><br /> +<a href="//skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-linux-init-halt</tt> program </h1> + +<p> +<tt>s6-linux-init-halt</tt> triggers the shutdown procedure in order to +halt the system; or, with the <tt>-f</tt> option, it performs an immediate +hard shutdown. +</p> + +<h2> Interface </h2> + +<pre> + s6-linux-init-halt [ -h | -p | -r ] [ -d | -w ] [ -W ] [ -f ] [ -R <em>tmpfsdir</em> ] +</pre> + +<ul> + <li> If the <tt>-f</tt> option is present, s6-linux-init-halt halts the system immediately. </li> + <li> Else, it triggers the machine's shutdown procedure. + <li> It exits 0. The shutdown procedure happens asynchronously. </li> +</ul> + +<p> + This interface follows the traditional <em>sysvinit</em> interface for the +<tt>halt</tt>, <tt>poweroff</tt> and <tt>reboot</tt> programs as close as possible. +</p> + +<h2> Exit codes </h2> + +<ul> + <li> 0: shutdown procedure triggered. </li> + <li> 100: wrong usage, or user does not have root privileges. </li> + <li> 111: system call failed. </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-h</tt> : halt. No matter the name of the command, it will order +a halt (i.e. the system will be shut down, but the power will remain up). +This is the default for <tt>s6-linux-init-halt</tt>. </li> + <li> <tt>-p</tt> : poweroff. No matter the name of the command, it will order +a power off. This is the default for <tt>s6-linux-init-poweroff</tt>. </li> + <li> <tt>-r</tt> : reboot. No matter the name of the command, it will order +a reboot. This is the default for <tt>s6-linux-init-reboot</tt>. </li> + <li> <tt>-d</tt> : Do not write a wtmp shutdown entry. </li> + <li> <tt>-w</tt> : Only write a wtmp shutdown entry; do not actually shut down +the system. </li> + <li> <tt>-W</tt> : Do not send a <tt>wall</tt> message to users before shutting +down the system. Some other implementations of the <tt>halt</tt>, <tt>poweroff</tt> +and <tt>reboot</tt> commands use the <tt>--no-wall</tt> long option to achieve this. </li> + <li> <tt>-f</tt> : 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. </li> + <li> <tt>-R <em>tmpfsdir</em></tt> : assume that the root-only +boot-time tmpfs has been mounted on <em>tmpfsdir</em>. Default is <tt>/run</tt>. +It is important to get this right, because the contact point with the +<a href="s6-linux-init-shutdownd.html">s6-linux-init-shutdownd</a> daemon, +which manages the shutdown procedure, is located under this directory. The +<tt>halt</tt>, <tt>poweroff</tt> and <tt>reboot</tt> scripts created by a +<a href="s6-linux-init-maker.html">s6-linux-init-maker</a> invocation +automatically use the correct <tt>-R</tt> option. </li> +</ul> + +<h2> Notes </h2> + +<ul> + <li> The +<a href="s6-linux-init-halt.html">s6-linux-init-halt</a>, +<a href="s6-linux-init-poweroff.html">s6-linux-init-poweroff</a>, +<a href="s6-linux-init-reboot.html">s6-linux-init-reboot</a> and +<a href="s6-linux-init-shutdown.html">s6-linux-init-shutdown</a> +binaries are not meant to be called directly by administrators. +Instead, their purpose is to be used in <tt>halt</tt>, <tt>poweroff</tt>, +<tt>reboot</tt> and <tt>shutdown</tt> scripts created by +<a href="s6-linux-init-maker.html">s6-linux-init-maker</a>; those scripts +will call them with the correct <tt>-R <em>tmpfsdir</em></tt> option. +The scripts should typically be linked to <tt>/sbin</tt> after +<a href="s6-linux-init-maker.html">s6-linux-init-maker</a> execution, to +provide drop-in replacements for the <em>sysvinit</em> programs with the +same names. </li> +</ul> + +</body> +</html> |