Joachim Breitner

Some late recognition of metainit

Published 2011-12-03 in sections English, Debian.

Four years ago, during DebConf 7 in Edinburgh, I had the idea of creating init scripts not by hand, but rather describe them in a declarative way that handles most common cases and generate the real init scripts from them. Back than, this was partly motivated by the varying quality of init scripts and the advent of an alternative init system, upstart, for which proper service files could be generated as well.

I implemented the idea and uploaded it as metainit to Debian, but it did not take off. Only one package uses it, and this package is not used much either. The project basically fell dormant.

Yesterday, I got this mail:

Hi Joachim,

I'm not very familiar with Debian ecosystem, however our company has recently switched to exclusively using Debian based servers, please forgive me if there exists a better channel for sending patches.

We need (in house) to create a lot of trivial services and the sysv init system seems an ideal way to manage them, and metainit an great way to keep the config simple.

However all our scripts require a heartbeat, the way we normally do this is with a bunch of checkers launched from cron. Metainit was ideal, but lacked the simple 'status' task found in most init scripts.

This small patch adds that task, I hope you and others find it usefull.

Regards,

together with the mentioned patch. So it turned out that the idea was a useful one after all, although it found its use on our user’s machines, and not within the Debian packages, as I originally anticipated. Nice!

During the recent discussions about the latest init system, systemd, there were more thoughts about generating init scripts/upstart service descriptions/systemd units from a declarative description, and if metainit had taken off back then, things would be easier now. So if anyone feels like reviving the project: Please do.

Comments

Aren't systemd service files essentially declarative descriptions of services? Plus they already have a parser written in systemd.



Hooking into that (somehow - SMOP :-) to produce sysv init scripts/upstart config files might be able to get you 95% of the way there. It can't hurt that many services already have systemd service files written.
#1 Karellen am 2011-12-04
Correct, and exactly my point in http://lists.debian.org/1311064535.2467.3.camel@kirk. Unfortunately, systemd was not around when I gave metainit a shot.
#2 Joachim Breitner (Homepage) am 2011-12-04

Have something to say? You can post a comment by sending an e-Mail to me at <mail@joachim-breitner.de>, and I will include it here.