I was looking at porting the init scripts for
some common daemons that I run (openssh, etc.)
to s6, and I immediately ran into the obvious
issue that many of these services have non-trivial
ordering dependencies ('net' and 'dns' targets, etc.)
The simplest transitional configuration would be
to have OpenRC still manage service/networking
dependencies as it does today, and just replace
the 'start-stop-daemon' invocations in the scripts
with the appropriate s6 equivalent. But ultimately
I'm interested in seeing if I can get everything on
my system running under s6-rc. (I don't know yet how
interesting this is to upstream Adelie, but I'm happy
to contribute whatever is interesting.)
Consequently, I'm looking at writing some tooling
to generate s6-rc service definition directories
and bundles for the 'net' prerequisite. In practice
I think this looks like a tool to read the system
networking configuration from a file and generating
execline scripts that do the appropriate iproute2 voodoo,
launch a supervised dhcpcd, etc.
(I haven't thought too seriously about wireless/hotplug
yet, since I'd likely have to open the udev can of worms.)
Ultimately this would serve the same purpose as netifrc
or NetworkManager, albeit with somewhat narrower scope.
One obvious upside here is that s6 supports (a subset of)
socket activation, so this would open the door to cool
stuff like services that can wait for dhcp/slaac address
assignment, route configuration, etc.
If anyone is aware of a similar effort already in
progress, let me know.
I'll probably start looking at this seriously towards
the end of next week, but I'm interested to gather some
initial feedback on the concept before I head down that path.