From 244dddd0ada79388a27f33e73b173764c581fca1 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 19 Aug 2019 13:15:40 +0000 Subject: Add stage 4 hook support --- doc/overview.html | 4 ++++ doc/s6-linux-init-umountall.html | 14 +++++++------- doc/upgrade.html | 4 ++++ 3 files changed, 15 insertions(+), 7 deletions(-) (limited to 'doc') 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 halt, poweroff,
  • runlevel: the script executing a machine state change at boot time (normally invoked by rc.init, towards the default runlevel) or when the administrator runs a telinit command.
  • +
  • rc.shutdown.final: 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, just before the system +is rebooted or the power turned off. This script normally remains empty.
  • 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 /proc/mounts 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). +
  • It makes an exception for the first instances of devtmpfs, proc +and sysfs filesystem types, but not for later instances. In other words: it +does not attempt to unmount /dev, /proc and /sys, but it +will attempt to unmount duplicates of those pseudo-filesystems.
  • s6-linux-init-umountall does not touch /etc/mtab.
  • If a filesystem fails to unmount, a warning is printed to stderr, but s6-linux-init-umountall still attempts to unmount all the other ones.
  • @@ -42,7 +46,7 @@ it read-only).

    s6-linux-init-umountall returns the number of errors it encountered -when attempting to unmount all the filesystems listed in /proc/mounts. +when attempting to unmount the filesystems listed in /proc/mounts.

    Notes

    @@ -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.
  • It is likely that some filesystems will still fail to unmount, typically -/proc and /dev. 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.
  • Distributions usually provide a umount command with a -a 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 -s6-linux-utils package also -provides a s6-umount -command with a -a option, but adding a dependency to that package would be a -higher cost than simply reimplementing the specific functionality here.
  • +and relies on unsafe interfaces, so it was decided not to use it. 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 @@

    in 1.0.2.1

    -- cgit v1.2.3