Re: s6 init-stage1

From: Peter Pentchev <roam_at_ringlet.net>
Date: Tue, 6 Jan 2015 14:12:54 +0200

On Tue, Jan 06, 2015 at 01:02:46PM +0100, Laurent Bercot wrote:
> On 06/01/2015 09:00, Colin Booth wrote:
[snip]
> >5. I made a few more classes of services for init-stage2 to copy into
> >the service directory. Specifically for things that I wanted running
> >ASAP and were udev agnostic. Those were: syslogd (using s6-ipcserver
> >and ucspilogd), klogd, cron, and udev. Mostly that was because I
> >needed udev running (and supervised) before bringing up dbus, and I
> >wanted to make sure /dev/log had a reader before I started bringing
> >anything up that might not want to talk to stdout instead (openssh,
> >I'm looking at you).
>
> The order in which init-stage2 starts services and interleaves them
> with one-shot commands should mirror your dependency graph. This is
> where a dependency management system would come in handy; I plan to
> work on a program that takes a dependency graph as its input (format
> TBD) and outputs a suitable init-stage2 script.
>
> (Crazy idea brewing. Dependency graph management is a solved problem:
> it's exactly what "make" does. So my program could simply translate
> the service dependency graph into a Makefile, and make would
> output the script. This requires more thought.)

Even better: most modern systems have a tsort(1) utility for this kind of
topological sorting; BSD-derived systems have had it for ages.

G'luck,
Peter

-- 
Peter Pentchev  roam_at_ringlet.net roam_at_FreeBSD.org p.penchev_at_storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13



Received on Tue Jan 06 2015 - 12:12:54 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC