[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: On init in Debian



On Fri, 16 Mar 2012 20:05:25 +0100, Andreas Metzler <ametzler@downhill.at.eu.org> wrote:
> Philip Hands <phil@hands.com> wrote:
> > On Fri, 16 Mar 2012 14:37:39 +0100, Vincent Danjean <vdanjean.ml@free.fr> wrote:
> [...]
> >> * We could try to define a file format that allow a conversion (by a
> >>   separate specific tool or at runtime) to various init systems.
> >>   This would avoid to be blocked by the syntax/features of one "source"
> >>   init system.
> 
> > This was mentioned in the thread (I forget by whom) and strikes me as
> > the only viable strategy, in that this is the only way that the various
> > factions can all collaborate on making a workable solution, rather than
> > fighting for theirs to be The One True Init.
> [...]
> 
> I am not sure this actually is a big improvement, we might end up with 
> 
> * either being limited to the common featureset
> * or doing something like
> #ifdef systemd
> ....
> elseif upstart
> ...
> which is almost as bad as having to ship both init-scripts and systemd
> configuration file.

If we were going to end up with anything like that, then it would be no
improvement at all, and would not be worth wasting any effort on.

I was presuming (perhaps wrongly) that it would be possible to come up
with a high level specification of what a daemon provides, what it needs
to happen in order to run, what needs to be done to provoke it to reread
its settings, how one runs it in the foreground, and in the background
(either of which might be missing) etc. etc. etc

And then, given that lot, write a generic init.d script that can take
that as input and do something useful with it, but likewise, process it
into appropriate configs for both systemd and upstart.

Of course, I don't know enough about either systemd or upstart to know
how feasible such an approach might be, but if it is feasible it would
almost certainly eliminate some of the repeated bugs in sysinit at least,
and perhaps be helpful in the same way for the other two.

On the other hand, the xkcd cartoon is depressingly true, so perhaps we
should forget that idea -- I was rather hoping that it doesn't quite
apply here though, since we'd not be trying to write yet another init,
but just describe the configuration data needed by all init type things.

Cheers, Phil.
-- 
|)|  Philip Hands [+44 (0)20 8530 9560]    http://www.hands.com/
|-|  HANDS.COM Ltd.                    http://www.uk.debian.org/
|(|  10 Onslow Gardens, South Woodford, London  E18 1NE  ENGLAND

Attachment: pgpxzOrLVKfo1.pgp
Description: PGP signature


Reply to: