Michael C. Toren on Mon, 2 Aug 1999 16:43:51 -0400 (EDT) |
> Ok, some things I've learned in the past few hours..... It's always nice to see someone exploring :-) > under /etc/rc.d/rcX.d the X represents runlevels, and consequently orders of > execution. > under ./rcX.d, the files are names [S/K]Xalpha e.g. "S80sendmail" > S or K = start or kill respectively and following protocol, the number is > the order of execution > so for > /etc/rc.d/rc3.d/S80sendmail > you have > in runlevel3, for start services, at position 80, run sendmail A common method of keeping sanity is to have /etc/rc?.d filled with symlinks to shell scripts found in, say, an /etc/init.d directory. Debian does this, for example. I believe RedHat and other distributions do as well, but I don't know for certain. Curiously enough, SunOS 5.x does *not* do this, which can be annoying. This method of using /etc/rc?.d is the System V way of doing things, by the way. BSD derived systems normally have a single /etc/rc shell script, which brings up the initial system, and then usually calls something like /etc/rc.local at the end, which is where sysadmins are expected to place local changes. Personally, I'm somewhat partial to this linear approach. But the System V method does lend itself more to packaged systems, though. > (apparently the numbering scheme is arbitrary, you could as easily used > S8sendmail, or S8000sendmail, provided all required services were already > started. Think old BASIC numbering scheme 10, 20, 30 was only for purposes of > convenience, it could have been 1, 2, 3, and so on) Also of note is that there's nothing stopping you from performing two tasks at "position" 80. For instance, you can have both a S80sendmail file, and a S80apache file, if you like. > more cool stuff > /sbin/init = IT, period, the shit, da bomb, whatever you want to name it, init > is it, don't screw with init. Got it? init is the very first processed started by the kernel, and hence always has a PID of 1. It is also the only process *ever* created by means other than fork(2). Every other process can therefore trace it's lineage back to init. You can confirm this by doing a "ps jax", and checking the PPID (Parent PID) value for each running process. > Vale -mct
|
|