supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: multiplexd <multiplexd@gmx.com>
To: supervision@list.skarnet.org
Subject: Re: what init systems do you use ?
Date: Mon, 13 May 2019 20:13:29 +0100	[thread overview]
Message-ID: <20190513191328.uf4lvqvuaw5e6qat@flywheel> (raw)
In-Reply-To: <15692301556844801@iva7-b6ed732000ae.qloud-c.yandex.net>

All,

On Fri, May 03, 2019 at 02:53:21AM +0200, Jeff wrote:
> what init systems do this list's subscribers use ?

I saw Guillermo's reply up-thread, so I thought I'd add my own two cents. My
main workstation at present is a Debian 9 box booted with s6 and s6-rc, with
system setup and teardown (i.e. stages 1 and 3) handled by some execline scripts
heavily adapted from those generated by s6-linux-init-maker 0.4.x.x.

It's been nearly two years since I set this up, so I don't recall all the
details, but I started out with a sysvinit Debian 9 system, and
reverse-engineered the boot sequence, which included a by-hand conversion of all
the necessary /etc/init.d scripts into s6-rc service definitions.

The boot process follows the general flow to be expected from a system using
s6-svscan as PID 1. The stage 1 script sets up an initial service directory,
spawns the script which starts stage 2 and then exec's into s6-svscan. Most of
the runtime state configuration and management is then handled through s6-rc in
stage 2. Stage 3 involves deactivating all the s6-rc managed services and then
signalling the PID 1 s6-svscan, which execs into a script which kills the
remaining processes, unmounts filesystems and then performs a halt, poweroff, or
reboot as necessary.

The particulars of the configuration I'm using are generally not portable to
other machines though, as it was a proof-of-concept I came up with a year or two
or go for a different system, which I then ported to my current workstation,
which was set up in a very similar manner. I've also had to make it largely
signal-compatible with sysvinit, as apt(8) sometimes attempts to reload the init
configuration upon package changes. The signal used to request a configuration
reload from sysvinit is SIGUSR1 if I recall correctly, however the default
behaviour of the version of s6-linux-init-maker I was using at the time was to
power off the machine upon receiving SIGUSR1 in PID 1, so I had to change the
signal configuration for s6-svscan.

That being said, it's been very stable and has largely stayed out my way, so
it's been worth the initial setup effort in the long run.

Cheers,
--multiplexd.


  parent reply	other threads:[~2019-05-13 19:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 19:19 interesting claims Jeff
2019-04-30  2:49 ` Guillermo
2019-04-30  8:22 ` Laurent Bercot
2019-05-03  0:53   ` what init systems do you use ? Jeff
2019-05-11 18:45     ` Guillermo
2019-05-13 19:13     ` multiplexd [this message]
2019-05-13 20:36       ` Laurent Bercot
2019-05-13 21:09       ` Steve Litt
2019-05-14  2:34         ` Guillermo
2019-05-13 21:16       ` Joshua Ismael Haase Hernández
2019-05-14  5:50     ` Colin Booth
2019-05-14  7:15       ` eric vidal
2019-04-30  8:47 ` interesting claims Jonathan de Boyne Pollard
2019-05-01  7:26 ` Steve Litt
2019-05-01  7:33 ` Steve Litt
2019-05-01 18:13   ` Laurent Bercot
2019-05-15 17:22     ` Steve Litt
2019-05-15 23:22       ` Oliver Schad
2019-05-16  1:07         ` Steve Litt
2019-05-16  5:36           ` fungal-net
2019-05-16  8:32             ` Laurent Bercot
2019-05-16 17:10               ` Jeff
2019-05-17  0:23               ` Dewayne Geraghty
2019-05-17 11:21               ` fungal-net
2019-05-17 22:57                 ` Guillermo
2019-05-18  0:52                   ` Jeff
2019-05-18 16:26                     ` fungal-net
2019-05-18 20:04                       ` Guillermo
2019-05-19 11:24                         ` fungal-net
2019-05-19 12:57                           ` killall test run Jeff
2019-05-19 17:29                             ` Colin Booth
2019-05-19 20:39                             ` Guillermo
2019-05-19 23:06                               ` Laurent Bercot
2019-05-19 20:35                           ` interesting claims Guillermo
2019-05-03  1:37   ` how to handle system shutdown ? Jeff
2019-05-03 19:25     ` Laurent Bercot
2019-05-05  0:52       ` is it required to call kill() from process #1 ? Jeff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190513191328.uf4lvqvuaw5e6qat@flywheel \
    --to=multiplexd@gmx.com \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).