All of lore.kernel.org
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Sandy Harris <sandyinchina@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: RFC: Alternative to systemd?
Date: Mon, 20 Oct 2014 09:27:49 -0400	[thread overview]
Message-ID: <54450DD5.8060001@gmail.com> (raw)
In-Reply-To: <CACXcFmnjqsDZ0nq2h9ymiUQMczD7yX64COVnz8WsrC38fL1iuQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3144 bytes --]

On 2014-10-17 11:53, Sandy Harris wrote:
> I've been reading the debates around systemd, haven't reached any firm
> conclusion but the criticism that Unix programs should "do one thing
> and do it well" certainly resonates with me.
>
> On the other hand, this may be one of those cases where theory and
> practice need to differ; more-or-less all the arguments against
> systemd's complexity and overly broad scope have been used in debates
> over monolithic vs. message-passing kernels. I'd say that in theory
> message-passing and smaller programs are obviously better in some
> ways, but in practice other considerations may be more important. That
> is certainly the case for the kernel; I do not know if it is for
> systemd.
>
> All that said, I don't want to re-open the debate here. I would,
> though, like to solicit comment on what seems to me a possible simple
> alternative that deals with only one of the problems systemd claims to
> solve; expressing dependencies that the init process needs to deal
> with. There seems to be fairly widespread agreement that the way
> sysvinit does this rather clumsy.
>
> We already have a well-established way of dealing with some types of
> dependency, in makefiles. Would something with roughly that syntax
> work for expressing the dependencies here? Sample lines might be
> things like:
>
> sshd: random
>
> !random:
>         cat /var/run/random_seed >/dev/urandom
>
> The first line says sshd depends on random; "init sshd" will first
> deal with dependencies, so it does the command for random before
> starting sshd. Since no command is given for sshd, it defaults to
> "sshd &". If arguments are needed, put in a command line. If some
> other process depends on sshd it just checks whether it is running via
> "ps -C sshd" and, if not, starts it.
>
> "!random:" says, via the "!", that random is not a process that can be
> checked with ps -C. We would need to add a data structure to support
> another way to check if the process had been run. In actual use' we'd
> also have a more complex command than just the cat.
>
> It seems to me this could handle everything needed for init's startup
> activities. Adding simple run levels is straightforward; just define
> !runlevel3 or !network or whatever with appropriate dependencies. I am
> not certain whether or how it might be extended to stop processes when
> reducing run level, though.
>
> Comments?

Actually, Gentoo's OpenRC init system uses make for dependency 
processing already, but only when configured for parallel startup.  It 
would be nice if it were better integrated (OpenRC generates (and then 
caches) the Makefile each time one of the initscripts or runlevels gets 
modified).
To be honest though, systemd's developers seem to ignore the fact that 
there are many other init systems that have better dependency processing 
than sysvinit and/or can do parallel startup.  The only thing that I can 
see in systemd that isn't available in some other init system is socket 
activation, and even that isn't exclusive anymore with the advent of 
uselessd.



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2455 bytes --]

      reply	other threads:[~2014-10-20 13:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17 15:53 RFC: Alternative to systemd? Sandy Harris
2014-10-20 13:27 ` Austin S Hemmelgarn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54450DD5.8060001@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sandyinchina@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.