Skip to content

Debian's Policy-rc.d infrastructure explained

When one discusses advantages and disadvantages of some distributions over the other, it is a frequent beef against Debian that on Debian, network services get started immediately after the package was installed. On a package not driven by debconf, this includes the service getting started with some default configuration. On upgrades, services get stopped before the update and started automatically after the update was done. This might be useful with services that run with the default configuration, and is important with services that fork and re-read the configuration in the forked-off process. However, in some circumstances, it might be desireable to keep the old version of the service running until the new version is ready to start. I have always thought that this was written down in Debian policy, but I didn't find the place in the document, and asking on various IRC channels also resulted in no pointer. For now, I have to assume that this is "only" best practice in Deban and not mandatory in any case.

Debian is frequently bashed for this default, and the canonical answer is to use the policy framework delivered with sysv-rc to avoid services from being started. Since this mechanism is frequently misunderstood, I am writing this article to bring some more additional confusion to this matter.

Updated 2013-09-01: Default behavior controllable by init script headers.

Continue reading "Debian's Policy-rc.d infrastructure explained"