The list is generated by scanning the contents of the directory /etc/rc.d/init.d. There is a file for each service. The files contain scripts (typically a bash script) that support the commands start and stop (minimum) and often also restart, reload and status. Take a look at some of the files in this directory to see what I mean... look at /etc/rc.d/init.d/named, for example (that particular one will only be available if you have the DNS nameserver software loaded).
This is a powerful, flexible system that can be manipulated directly from the command line or easily represented in GUI dialogs.
If you run your system in "pure" graphic mode you are in runlevel 5. If you run your system in the faster mode (text logins, then type "startx" to get into a GUI) you are in runlevel 3. There are other runlevels that serve other purposes, and a bit of documentation can be found in the comments of the file /etc/inittab. Don't bugger up *that* file, incidentally, or your system will probably fail to boot.
In Red Hat, the tool chkconfig updates and queries runlevel information for system services. This tool wants to see certain information in the comments at the top of each script in /etc/rc.d/init.d; if you look at some of the scripts already there you should see what I mean; alternatively check the doco for the chkconfig tool (do a man chkconfig from a terminal prompt) which explains what these comments mean and what you will have to do to get your new service known by chkconfig and friends.
|