summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-08-19 13:15:40 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-08-19 13:15:40 +0000
commit244dddd0ada79388a27f33e73b173764c581fca1 (patch)
tree9534fd0cadc2418c57188647b73e4d69883f3443 /doc
parent01b815a073101521e0b53cf4ce8fa9c81b5fc5d8 (diff)
downloads6-linux-init-244dddd0ada79388a27f33e73b173764c581fca1.tar.xz
Add stage 4 hook support
Diffstat (limited to 'doc')
-rw-r--r--doc/overview.html4
-rw-r--r--doc/s6-linux-init-umountall.html14
-rw-r--r--doc/upgrade.html4
3 files changed, 15 insertions, 7 deletions
diff --git a/doc/overview.html b/doc/overview.html
index 4d0b7ba..d779dd2 100644
--- a/doc/overview.html
+++ b/doc/overview.html
@@ -81,6 +81,10 @@ procedure when the admin runs a <tt>halt</tt>, <tt>poweroff</tt>,
<li> <em>runlevel</em>: the script executing a machine state change
at boot time (normally invoked by <em>rc.init</em>, towards the default
runlevel) or when the administrator runs a <tt>telinit</tt> command. </li>
+ <li> <em>rc.shutdown.final</em>: a script that will be run at the
+very end of the shutdown procedure, after all processes have been killed
+and all filesystems have been unmounted, <em>just before</em> the system
+is rebooted or the power turned off. This script normally remains empty. </li>
</ul> </li>
</ul>
diff --git a/doc/s6-linux-init-umountall.html b/doc/s6-linux-init-umountall.html
index 2d1bf99..eff06c5 100644
--- a/doc/s6-linux-init-umountall.html
+++ b/doc/s6-linux-init-umountall.html
@@ -33,6 +33,10 @@
It processes <tt>/proc/mounts</tt> in the reverse order, starting with the most recently mounted
partition and ending with the root filesystem ("unmounting" the root filesystem means remounting
it read-only). </li>
+ <li> It makes an exception for the first instances of <em>devtmpfs</em>, <em>proc</em>
+and <em>sysfs</em> filesystem types, but not for later instances. In other words: it
+does not attempt to unmount <tt>/dev</tt>, <tt>/proc</tt> and <tt>/sys</tt>, but it
+will attempt to unmount duplicates of those pseudo-filesystems. </li>
<li> <tt>s6-linux-init-umountall</tt> does not touch <tt>/etc/mtab</tt>. </li>
<li> If a filesystem fails to unmount, a warning is printed to stderr, but
<tt>s6-linux-init-umountall</tt> still attempts to unmount all the other ones. </li>
@@ -42,7 +46,7 @@ it read-only). </li>
<p>
<tt>s6-linux-init-umountall</tt> returns the number of errors it encountered
-when attempting to unmount all the filesystems listed in <tt>/proc/mounts</tt>.
+when attempting to unmount the filesystems listed in <tt>/proc/mounts</tt>.
</p>
<h2> Notes </h2>
@@ -53,15 +57,11 @@ in "stage 4", i.e. after a SIGKILL has been sent to all the processes on the sys
right before the system reboots (or halts, or is powered off). By that point, there is
no possible process that could prevent real file systems from being unmounted. </li>
<li> It is likely that some filesystems will still fail to unmount, typically
-<tt>/proc</tt> and <tt>/dev</tt>. That's okay: those are pseudo-filesystems, and
+cgroups or tmpfses. That's okay: those are pseudo-filesystems, and
will not cause data loss or a fsck if the system shuts down while they are still mounted. </li>
<li> Distributions usually provide a <tt>umount</tt> command with a <tt>-a</tt> option
to unmount all filesystems. That command is usually bloated with historical artifacts
-and relies on unsafe interfaces, so it was decided not to use it. The
-<a href="//skarnet.org/software/s6-linux-utils/">s6-linux-utils</a> package also
-provides a <a href="//skarnet.org/software/s6-linux-utils/s6-umount.html">s6-umount</a>
-command with a <tt>-a</tt> option, but adding a dependency to that package would be a
-higher cost than simply reimplementing the specific functionality here. </li>
+and relies on unsafe interfaces, so it was decided not to use it. </li>
</ul>
</body>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 98a1bc0..a1d1ab3 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -23,6 +23,10 @@
<ul>
<li> Ctrl-Alt-Del management is now activated by default, instead
of requiring a sysctl setting in stage 2. </li>
+ <li> <a href="s6-linux-init-umountall.html">s6-linux-init-umountall</a>
+now skips the first instance of <tt>/dev</tt>, <tt>/proc</tt> and <tt>sys</tt>. </li>
+ <li> stage 4 (after every process has been killed and the filesystems have
+been unmounted) now calls a new user script, <tt>rc.shutdown.final</tt>.
</ul>
<h2> in 1.0.2.1 </h2>