From e00d2c4d88c90ccc6d091bde07d412936f8886d3 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 13 Oct 2015 16:05:05 +0000 Subject: - added stage2_finish support - s6 dep bumped to 2.2.2.0 --- doc/s6-linux-init-maker.html | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'doc/s6-linux-init-maker.html') diff --git a/doc/s6-linux-init-maker.html b/doc/s6-linux-init-maker.html index 530cd41..95c0101 100644 --- a/doc/s6-linux-init-maker.html +++ b/doc/s6-linux-init-maker.html @@ -50,6 +50,7 @@ machine - else the scripts will crash. [ -g early_getty ] \ [ -2 stage2 ] \ [ -r ] \ + [ -Z ] stage2_finish \ [ -3 stage3 ] \ [ -p initial_path ] \ [ -m initial_umask ] \ @@ -186,6 +187,37 @@ do not hold any file descriptor to a filesystem that would need to be unmounted. +

+ When s6-svscan receives a signal such as SIGINT, typically sent by the +Ctrl-Alt-Del key combination or a reboot or poweroff +command, it will run the corresponding script in +tmpfsdir/service/.s6-svscan, which will first run +stage2_finish, then send an exit command to s6-svscan as +described above. This is useful if some commands need to be run before +s6-svscan executes into stage3: for instance, if the machine +state is maintained by a service manager such as +s6-rc, all the +services can be turned off in stage2_finish while s6-svscan +is still alive, and then the last steps of the shutdown procedure can +be performed in stage3. +

+ +

+ Generally speaking, stage2_finish should undo what +stage2 has done at boot time, so stage3 has very +little work to do. +

+ +

+ The examples/ subdirectory of the s6-linux-init package +contains an example of /etc/rc.init, /etc/rc.tini +and /etc/rc.shutdown scripts, suitable for +stage2, stage2_finish and stage3 +respectively. Those scripts can practically be used as is if the machine +is managed by the s6-rc +service manager. +

+

s6-linux-init-maker options