Fedora Core's memory problem

December 14, 2006

; chkconfig --list autofs
service autofs supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add autofs')
; rpm -U autofs*.rpm
[...]
; chkconfig --list autofs
autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off

Is it too much to ask that Fedora Core remember what services I want and don't want running over package upgrades? Apparently it is, because this happens EVERY DAMN TIME. I am perpetually running around doing 'chkconfig --list | fgrep :on | sort' and disinfecting the latest infestation of stray daemons.

(I find autofs one of the more annoying daemons to pop up, because it claims some random directories and, worse yet, will remove them (assuming they're empty) when you shut it down. If you were using one of those directories as a regular mountpoint, interesting things (or at least annoying ones) can start happening. And it's not like the names it uses are obscure or uncommon, since it wants at least /net and /misc.)

This is an RPM packaging flaw; autofs's postinstall script does an unconditional 'chkconfig --add autofs'. The xinetd postinstall script illustrates the correct way to do this:

if [ $1 = 1 ]; then
    /sbin/chkconfig --add xinetd 
fi

This only runs the chkconfig when xinetd is installed, not when it is upgraded; if I turn it off, it stays off.

(For bonus irony, many RPMs that get this wrong manage to correctly not restart themselves during an upgrade when they weren't running in the first place, using 'condrestart' instead of 'restart'.)


Comments on this page:

From 216.27.165.251 at 2006-12-22 23:05:43:

This is one reason I like SMF in Solaris 10. Once a service has been disabled with svcadm ( e.g., 'svcadm disable autofs' ), it is disabled until you explicitly enable it. Hopefully the Linux folks will devise something similar in the coming years.

- Ryan

By cks at 2006-12-23 15:28:06:

I don't think that this is an issue of lacking tools; it's an issue of using tools the right way. Fedora Core has all the tools necessary to do it right (as xinetd illustrates), it's just that some packages are using the tools the wrong way.

Now, you can certainly argue that the Fedora Core tools make it unnecessarily difficult to do things the right way, and I can agree with that. Life would probably be simpler for everyone if there were two sets of chkconfig options, one used by programs for installing and removing themselves, and one used only by people, and the latter always overrode the former.

(This would also require that chkconfig keep some sort of a state database.)

Written on 14 December 2006.
« An example of Unix's slow fossilization
An unsurprising discovery about spammer behavior »

Page tools: View Source, View Normal.
Search:
Login: Password:

Last modified: Thu Dec 14 21:57:56 2006
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.