Dear software packagers, startup scripts edition

May 4, 2010

This is a grump.

Dear packagers of software for Linux distributions, please note this: just because I have your software installed does not mean that I want to run your daemon. Database systems, I am especially looking at you. Please package software accordingly, and please make sure that daemons stay turned off and not running even when harried sysadmins apply package upgrades.

Since the natural way for a harried sysadmin to make a daemon not run is to turn off its init.d script (with chkconfig on Red Hat derived systems and update-rc.d on Debian derived ones), your packaging should ideally support this. This means that you should not automatically recreate the /etc/rcN.d symlinks on updates; instead you should leave things alone, with whatever symlinks in place (or not in place) that are already there.

(Red Hat derived systems seem to be good about this. Debian derived ones, not so much. But perhaps I misunderstand the zen of Debian systems and the natural way to turn daemons off is not with update-rc.d, although I will point out that there are reasons to juggle the boot time priorities too.)

If you have another way to disable your daemon, especially if manipulating /etc/rcN.d symlinks is not reliable, you should absolutely mention it in a comment at the start of your init.d script. Really. If it is not there, or at least in a very prominent place in your distribution specific README, it might as well not exist until some sysadmin gets very, very aggravated with you some day.

In case you are curious, we have database systems installed but don't run their daemons because we want to let users run them if they need MySQL or PostgreSQL but we have absolutely zero interest in running a system database instance due to the hassles of backing it up, creating and managing database users and databases, dealing with space issues, and so on. If one of our users wants PostgreSQL or MySQL, they can deal with all of that themselves (and the space that their database uses comes out of their home directory or some other filesystem that they have access to).

Sidebar: how to disable the PostgreSQL daemon on Ubuntu (8.04)

Change /etc/postgresql/<VER>/main/start.conf to another option besides auto. The comments in the script will tell you what your other options are.

On a casual inspection, I can't see any way to do this for MySQL. Get used to running 'update-rc.d -f mysql remove' after every MySQL update. Oh, and you need to stop the daemon too, since the Ubuntu postinst package appears to default to auto-starting the daemon after an upgrade.

(I would love to be wrong about this.)

Written on 04 May 2010.
« Keeping track of filesystem consistency
The right way to fix ZFS disk glitches (at least for us) »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Tue May 4 00:36:21 2010
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.