S6

S6 Article description::is a supervision suite similar to [[Runit, Daemontools, and Daemontools-encore.]] S6 also carries similarities to Runit on its design which can be used to bypass SysVinit init and OpenRC altogether. However, the command line utilities are named after daemontools with s6- prefix. Moreover, S6 comes with a shell like interpreted language&mdash;execline&mdash; to facilitate init/PID 1 migration, that is, stage 1&mdash;system initialization&mdash; and stage 3&mdash;system halt. (Init) Stage 1 should exec into stage 2&mdash;system normal functioning state&mdash; to give s6-svscan (process supervisor utility) the wheel of the system.

Configuration
The difficult task of writing an init replacement implementation fitted for a particular OS may be alleviated using execline interpreter to manage piping black magic when Init-Stage-1 has to manage a full system initialization. However, using the power and flexibility of OpenRC wouldn't certainly hurt... but this is only a slight warning for a complete migration from SysVinit+OpenRC, or any other init system for that matter, though.

Supervision
See Runit article for more information because every step described in that article apply here, minor an init (PID 1) replacement.

PID 1 is left as an implementation choice (to distribution and/or Operating System), that is, no init is offered&mdash;writing one is necessary! Of course, using the power and flexibility of OpenRC is an option... See Runit article.

Init stage 1 &mdash; System initialization
See Runit for more info.

Init stage 2 &mdash; System normal functional state
See Runit for more info.

Init stage 3 &mdash; System halt and shutdown
See Runit for more info.

S6's Stage 3 is quite different from Runit's stage 3. Special care should be taken here! The stage 3 is divided into .s6-svscan/crash and and .s6-svscan/finish scripts&mdash;the first for s6-svscan crash and the latter for extra steps that should dealt when terminating s6-svscan (system halt'' included if used as PID 1.) And .s6-svscan should be present in /service/ directory or... the directory would be created without any safety net (crash/finish cases.)

Socket activation
s6 provides a set of UNIX networking utilities s6-networking (package) for fd-holding&mdash;now marketed as Socket Activation&mdash;which can be paired with S6 supervision suite, if need be, to get super-server&mdash;like Inetd&mdash; capabilities. See External Resources for more info.

External resources

 * Socket Activation Requirement?
 * Why Process Supervision (at all and s6 in particular?)
 * Supervision Scripts Framework with an OpenRC friendly stage 1, 2, and 3 for S6
 * Gentoo Forums
 * Avery Payne's Supervision-Scripts Collection