init script generators ( was: Re: proper handling of communication channels in debian)

Henrique de Moraes Holschuh hmh at debian.org
Thu May 3 14:38:21 UTC 2007


On Thu, 03 May 2007, Erich Schubert wrote:
> I posted a proposal to the list here to use /proc/1/exe for detecting
> which init system is currently running (and then invoking the
> appropriate /etc/init-tools/invoke/foobar etc. commands). I don't know
> if anyone has investigated this closer.

This will flag which initscript is being run *on that cointainer* in
virtualized systems.  But it will do the wrong thing on regular chroots.


Also, on the topic of scriptlets, there are some points I'd like to make:

1. Avoid crap formats, PLEASE.  Either use XML or have two files, one with
the metadata in a easy to parse format that has no [foo] windows-.ini crap,
and the other with the real data.

XML may be heavy, but at least it *always* gets CDATA and charsets right,
even when you have to mix them.  Reinventing the wheel is not a good idea.

2. Remember that reading an entire directory of files is *SLOW* on ext3, but
that resilience is more important than anything else in a init script
system, so both have to be taken into account.  If you place everything in
one file, use a format with extremely strict validation capabilities to flag
any possible corruption right away.  And add a fsck-like thing for it.

3. Some init script systems *already* have this scriptlet idea implemented,
so look at what they did first.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



More information about the initscripts-ng-devel mailing list