Wandering Thoughts archives


/etc/inittab versus /etc/rc.d

One aspect of yesterday's problem is a little ordering issue between /etc/inittab and stuff in /etc/rc.d. Namely:

Everything in /etc/rc.d runs before other things in /etc/inittab really takes effect.

(The paths here are for Red Hat; elsewhere, what Red Hat puts in /etc/rc.d is just put straight into /etc, so you have /etc/init.d and /etc/rc3.d and so on.)

Normally the only effect this has is things like being able to log in via ssh well before you can log in on the console. In the case yesterday, the machine had one QMail listener being started via rc.local as part of the regular rcN.d startup scripts, and another one being started through Dan Bernstein's svcscan system that's kicked off directly from a line in /etc/inittab; the former won, to my confusion when I was looking at the latter.

(The init and inittab documentation doesn't really say what order /etc/inittab entries are run in, but I suspect that in the order they occur in the file is not a bad assumption. The lines that run the system startup scripts are usually very early in inittab.)

Reading /etc/inittab and following everything there can be interesting in general. Almost all of the bits and pieces are shell scripts, and it really gives you an understanding of just what the system does when. (And every so often it's useful to know the commands to force a poweroff or reboot right now.)

sysadmin/InittabVsRcD written at 00:22:33; Add Comment

Page tools: See As Normal.
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

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