Metainit in Ubuntu?

Joachim Breitner nomeata at
Thu Jun 21 10:26:41 UTC 2007

Hi Scott, hi Ubuntu developers,

here at the DebConf 7 in Edinburgh we came up with a somewhat neat idea:
Observing that a lot of packages ship init scripts, and noting that most
of these scripts are both not very well cared for (just copy’n’pasted
and slightly adjusted) and also very similar, we thought that this can
be done better.

This lead to the idea of metainit which 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

The advantages of this system are
 - For the package maintainer:
   No need to manually create and maintain init scripts or upstart jobs
 - For the distrubtion in general:
   More consistent init scripts in the distribution
   Easier to add new features (e.g. lsb output)
 - 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.

I’d like to advocate this approach in ubuntu as well as in debian, to
keep them as compatible as possible, and hopefully to get some more
support when developing and spreading meatinit. 

I do not have the time to do maintain the ubuntu specific parts of
metainit itself and would rather focus on the debian side. It would be
great if someone would pick up the ubuntu part, write a spec and work
with me to make metainit useful to ubuntu as well.


Wiki page (still reflecting the brainstorming phase):

You can find binaries and the source on:

You can browse the source or do a darcs get on:

A description of the metainit file format (as perldoc):;a=headblob;f=/lib/MetaInit/

Example metainit files:

A descriptions of the steps to upgrade a package to metainit:

A debian directory of a simple daemon (without debhelper):

A debian directory of a simple daemon (with debhelper):
(the debian/infon-server.init file is not used anymore)

Joachim "nomeata" Breitner
Debian Developer
  nomeata at | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: joachimbreitner at |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : 

More information about the initscripts-ng-devel mailing list