Re: Thoughts on "First Class Services"

From: Avery Payne <>
Date: Tue, 28 Apr 2015 11:47:24 -0700

On 4/28/2015 10:50 AM, bougyman wrote:
> Well at least we're talking the same language now, though reversing
> "parent/child" is disconcerting to my OCD.

Sorry if the terminology is "reversed".

>>> Here's the current version of, with dependency support baked
>>> in:
>> That's a gnarley run script. It's as big as a lot of sysvinit or OpenRC
>> scripts I've seen. One of the reasons I like daemontools style package
>> management is my run scripts are usually less than 10 lines.
> This was my thought, as well. It adds a level of complexity we try to
> avoid in our run scripts.
> It also seems to me that there is less typing involved in individual
> run scripts than the
> individual things that have to be configured for this script. If on
> goal of this
> abstraction is to minimize mistakes, adding more moving parts to edit
> doesn't seem to
> work towards that goal.

Currently there are the following sections, in sequence:

1. shunt stderr to stdout for logging purposes
2. shunt supporting symlinks into the $PATH so that tools are "called"
correctly. This is critical to supporting more than just a single
framework; all of the programs referenced in .bin are actually symlinks
that point to the correct program to run. See the .bin/use-* scripts
for details.
3. if a definition is "broken" in some way, then immediately write a
message to the log and abort the run.
4. if dependency handling is enabled, then process dependencies.
Otherwise, just skip the entire thing. By default, dependencies are
disabled; this means ./run scripts behave as if they have no dependency
4a. should dependency handling fail, log the failing child in the
parent's log, and abort the run.
5. figure out if user or group IDs are in used, and define them.
6. figure out if a run state directory is needed. If so, set it up.
7. start the daemon.
Received on Tue Apr 28 2015 - 18:47:24 UTC

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