|
When the computer starts-up, the first thing that it does is to run a program called init. At startup, that program refers to /etc/inittab based on the selected "runlevel" (usually 5).
The typical contents of an inittab will cause all of the commands in /etc/rc.d/rc5.d/ to be executed. All file-names beginning with 'S' (startup) are executed, in alphabetic order. The 'K' files are used similarly at shutdown.
You will notice that all of these files are symbolic-links, and definitely numbered, so that their sequence of execution is certain.
Usually, the inittab then specifies that /etc/rc.d/rc.local is scanned or executed last, if it exists. Its contents and purpose are the same.
What you'll do is to build a command-file containing the necessary instructions, put it (maybe...) in /etc/init.d, and link to it from the appropriate /etc/rc.d/rc.# directories, or from rc.local.
It is very important to understand init and the central role that it plays in the operation of the entire system for the entire duration of its uptime.
|