:: Re: [Dng] Suckless init and friends
Página Inicial
Delete this message
Reply to this message
Autor: James Powell
Data:  
Para: Steve Litt, dng
Assunto: Re: [Dng] Suckless init and friends
As a co-submission, the Runit-for-LFS project over at Bitbucket is freely available. We also have a subproject called init-shim which duplicates many of the sysvinit software.

https://bitbucket.org/ReaperX7/runit-for-lfs

If Devuan can find it useful, by all means clone and redevelop as needed. Our stuff is MIT licensed to maximize freedom to you to users/deployers so as long as you acknowledge the original developers, feel free to make it your own as you see fit as Runit-for-Devuan.

Sent from my Windows Phone
________________________________
From: Steve Litt<mailto:slitt@troubleshooters.com>
Sent: ‎5/‎8/‎2015 11:28 AM
To: dng@???<mailto:dng@lists.dyne.org>
Subject: [Dng] Suckless init and friends

Hi all,

This email isn't a recommendation for the Devuan distribution, it's
just some interesting info for the more DIY members of the Devuan
community...

Consider the following:

* Suckless init: http://git.suckless.org/sinit

* Suckless svc: http://core.suckless.org/svc

* Suckless portable utils (sbase): http://core.suckless.org/sbase

* Suckless nonportable utils (ubase): http://core.suckless.org/ubase

The init program does initialization with no process management. It
passes control to rc.whatever. In that respect, it doesn't conform to
Laurent's minimum of supervising at least one process, but rc.whatever
can exec to something that manages all processes, so you have only that
one tiny process at risk.

The ubase utilities include something called "respawn", which
apparently manages a process via fifo
(http://git.suckless.org/ubase/tree/respawn.c). They have some
shellscripts in the svc svc-master group, which appear to make for very
simple init scripts.

=== MY PLANS ===

So what I'm going to do, when I get the time, is init a Linux box with
Suckless init (http://git.suckless.org/sinit/tree/sinit.c), and have it
transfer control to rc.whatever, which will be a tiny script using
respawn to run all the rest of the process management, using respawn
for early stuff, and daemontools or daemontools-encore for the rest.

I've already done a proof of concept, I can init to /bin/bash using
Suckless Init, and when I send the proper SIGUSR1, SIGCHLD, or SIGINT
to PID1, it runs rc.shutdown with the expected arguments. Here's an
example rc.shutdown: http://git.2f30.org/ports/tree/fs/bin/rc.shutdown

The result will be very close to an init system as defined by Laurent:
The only unmanaged process will be rc.whatever, and that will be a tiny
script unlikely to abort by itself.

If I *really* get into it, I think there might be a possibility of
mixing the code of sinit.c with the code of respawn.c, to produce an
init that *supervises* rc.whatever instead of just running it, with
rc.whatever supervising and sub-supervising all the rest. What would
make this challenging is that respawn.c
(http://git.suckless.org/ubase/tree/respawn.c) depends on a fifo, and
this might be before the root filesystem is mounted.

Like I said before, I'm not advocating that Devuan put in any hooks or
packages for this stuff, I'm just commenting on what's available for
experimentation.

SteveT

Steve Litt
May 2015 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz
_______________________________________________
Dng mailing list
Dng@???
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng