Getting rid of useless stuff
Since I've been using Redhat/RPM-based distros for the most part of my 'Linux experience', I'm quite used to chkconfig. Especially because of the 'one size fits all' approach of having a zillion unneeded services on bootup taken by some distros. So, every time I'd give a new distro a try I'd inspect the list of services with 'chkconfig --list' and see what doesn't belong there. Usual candidates would be pcmcia and laptop stuff, RAID scripts, but also other things.
So, I was a bit surprised that Ubuntu/Debian's update-rc.d wasn't capable of that much, until I checked the manual page. Here's the relevant excerpt:
Please note that this program was designed for use in package maintainer scripts and, accordingly, has only the very limited functionality required by such scripts. System administrators are not encouraged to use update-rc.d to manage runlevels. They should edit the links directly or use runlevel editors such as sysv-rc-conf and bum instead.
Oh-kay, but then my question is: why is it that neither sysv-rc-conf or bum are installed by default - after all, the number of people coming from RPM-based distros to Ubuntu isn't that negligible, I would say.
Anyway, after googling a bit I found a post that suggested sysv-rc-conf would be a good chkconfig replacement, so I decided to go with it. And it's quite good - so similar to chkconfig that it could be a good idea to make 'chkconfig' a symlink to 'sysv-rc-conf' on installation.
So, after installing sysv-rc-conf (the usual apt-get install sysv-rc-conf) I got to removing useless stuff. NOTE: this list only applies for my particular needs. Study it carefully before applying the changes to your installation.
Here's a list, off the top of my head:
- atd
- This was deprecated in Mandrake 9.x at least, why Ubuntu enables it is beyond me.
- bluez-utils
- I don't have any Bluetooth devices; however, this is probably not the case with most people nowadays.
- festival
- Why the hell would everybody need speech-recognition software? Not to mention that the script in /etc/init.d has 'exit 0' at the beginning, so you have to comment out that line to actually use the package. This is just stupid - the script is being run anyway, I think not enabling the script altogether is more sensible.
- laptop-mode, powernowd, pcmcia
- I don't have a laptop, so I'm not interested in laptop features like frequency scaling.
- mdadm
- Software RAID support - I don't use that yet.
- ppp
- I haven't been using PPP for a while. Apparently others are using it, otherwise it wouldn't be one of the packages ubuntu-standard depends on.
I was tempted to also get rid of rsync, but then realized that it uses a similar scheme to festival: it would check /etc/default/rsync to see if rsync should be enabled, and only after that would run the actual server. This seems a bit stupid to me - why leave the script there if there's nothing for it to do? It's just wasted time on bootup, so after thinking a bit, I've decided to get rid of it.
After this time of playing with startup scripts and realizing that according to recommended usage, most scripts in /etc/init.d should have symlinks to them in /etc/rcX.d which would get run (either with 'start' or 'stop' as arguments), I think it's no wonder that Linux bootup can seem quite slow. Although, I must say, Ubuntu is faster than the SuSE 9.1 (OK, quite old) I have at work or the Mandriva 2006.0 on my othe linux partition. Can't wait for the new init announced for Edgy!

0 Comments:
Post a Comment
<< Home