Wandering Thoughts archives

2006-12-14

Fedora Core's memory problem

; 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'.)

linux/FedoraMemoryProblem written at 21:57:56;


Page tools: See As Normal.
Search:
Login: Password:

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.