Differences between revisions 9 and 10
Revision 9 as of 2007-06-23 09:57:00
Size: 3137
Editor: nomeata
Comment:
Revision 10 as of 2007-06-23 10:06:22
Size: 3242
Editor: nomeata
Comment:
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
 * A list of init scripts in debian and their metainit-able status (please contribute): ["/InitSurvey"]

Summary

A project to provide an infrastructure for automatic init script generation in simple cases.

Problem to solve

A lot of packages ship init scripts, and most of these scripts are both not very well cared for (just copy’n’pasted and slightly adjusted) and also very similar. Fixing this is hard, and so is introducing new features to all init scripts.

Outline of metainit

Metainit compromises of

  • A small declarative file format to describe the daemon, to be shipped by the package (or created by a local admin)
  • A meatinit package that creates init scripts (or, yet to be written, upstart jobs) from these files
  • A dh_metainit scripts to ease the inclusion of metainit files in your package, that adds appropriate maintainer script snippets.

In a way, metainit is a mixture of the menu system and cdbs, for init scripts.

The advantages of this system are

  • For the package maintainer:

    • No need to manually create and maintain init scripts or upstart jobs
  • For Debian:

    • More consistent init scripts in the distribution
    • Easier to add new features (e.g. lsb output), without recompilation of packages
  • For the ubuntu/debian relationship:

    • The same package could be used unmodified in Debian (creating sysvinit scripts) and ubuntu (upstart jobs)
  • For ubuntu:

    • It could help to ease the transition to a pure upstart based system.
  • For the user:

    • Can create “good” init scripts for custom daemons with just one line in one file and one command (update-metainit)

What this system is not meant for

Replacing all init script in packages. We (at least currently) will only support “simple” daemons (no very special dependencies, no strange ways of starting or stopping them, no forking mode supported, forking is done by the init script or upstart). We do hope to make metainit work for the “boring” 80%-90% of init scripts. All other packages are welcome to continue doing what they did before.