Re: [announce] s6-rc: a s6-based service manager for Unix systems

From: Colin Booth <cathexis_at_gmail.com>
Date: Wed, 23 Sep 2015 17:55:49 -0700

On Wed, Sep 23, 2015 at 3:58 PM, Avery Payne <avery.p.payne_at_gmail.com> wrote:
>
> * Write a script to translate the ./needs directory of a definition into a
> dependencies file. Which is more or less a one-liner that pipes the
> directory listing into a text file one line at a time. The script will be
> placed into svcdef/.bin (along with all of the other tool scripts). Should
> be easy.
Yup. Your ./needs are the same as a s6-rc ./dependencies file.
> * Write a script that, for a given definition, calls the ./needs translator
> (when required), then copies the definition + (optional) dependencies file
> into the source directory format, making any name changes as needed. Not
> rocket science.
The only issue you'll run into there is you'll need to make that a
two-pass system. Pass one is to generate a ./dependencies file for
s6-rc's source files, then calling s6-rc-compile. I'd suggest seeing
about doing a one-time conversion to the ./dependencies naming, and
then updating your scripts to use that name instead of ./needs in
order to not break folks who don't use s6-rc.
> * Figure out how to place the .bin, .run, .log, and .finish directories into
> the live system. This is probably done with another simple support script
> that simply does a "cp -Rav" of them to where the compiled definitions live.
> Not exactly rocket science either.
There might be a chance that s6-rc-compile derefrences symlinks into
real files, or just bulk copies those files without massaging them. If
either is the case it should be safe to just put those into place with
the target pointing in the right place (the real .bin directory in the
dereference case, dangling into space in the bulk copy case). You'll
need to experiment but it shouldn't be too much of an issue.
> Beyond that, the rest of the definitions should be plug and play.
>
> With regard to converting rc scripts to source format...I'm all ears, this
> would of course accelerate my project by an order of magnitude, because I
> would be able to simply convert the giant blob of rc definitions that I
> extracted from Debian 7...
>
rc scripts are easy peasy: figure out dependency order, write
oneshots. The only one that was an issue is the udev script, and I
solved that by running udev as a oneshot, then running udev stop, then
firing off the logrun udev.

I can send you my (almost) 100% functional Debian rcS stuff
replacement stuff that I use to run one of my systems. If you can
figure out why the acpid keyboard hooks don't work after start, that'd
be great.

Cheers!
Received on Thu Sep 24 2015 - 00:55:49 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC