Sflack Linux uses the same Slackware Linux BSD-style file layout for its system initialization files. These files are organized and easy to edit. All of the system initialization files are stored in the /etc/rc.d directory. To prevent a script from executing at startup you can remove the execute permission on the file and Sflack will not execute it. The following is a general description of what the different files do.
The first program to run under Sflack besides the Linux kernel is init. This program reads /etc/inittab file to see how to run the system. It runs the /etc/rc.d/rc.S script to prepare the system before going into your desired runlevel. The rc.S file enables your virtual memory, mounts your filesystems, cleans up certain log directories, initializes Plug and Play devices, loads kernel modules, configures PCMCIA devices, sets up serial ports, and runs System V init scripts (if found). There are some scripts in /etc/rc.d that rc.S will call on to complete its work:
|rc.S||This is the actual system initialization script.|
|rc.acpid||Starts the acpi daemon|
|rc.hotplug||This script starts hotpluggable subsystems|
|rc.modules||Loads kernel modules. Things like your network card, PPP support, and other things are loaded here. If this script finds rc.netdevice, it will run that as well.|
|rc.pcmcia||Probes for and configures any PCMCIA devices that you might have on your system. This is most useful for laptop users, who probably have a PCMCIA modem or network card.|
|rc.serial||Configures your serial ports by running the appropriate setserial commands.|
|rc.sysvinit||Looks for System V init scripts for the desired runlevel and runs them. This is discussed more in detail below.|
After system initialization is complete, init moves on to runlevel initialization. A runlevel describes the state that your machine will be running in. Sound redundant? Well, the runlevel tells init if you will be accepting multiuser logins or just a single user, whether or not you want network services, and if you will be using the X Window System or agetty to handle logins. The files below define the different runlevels in Slackware Linux that are the same in Sflack.
|rc.0||Halt the system (runlevel 0). By default, this is symlinked to rc.6.|
|rc.4||Multiuser startup (runlevel 4), but in X11 with KDM, or XDM as the login manager.|
|rc.6||Reboot the system (runlevel 6).|
|rc.K||Startup in single user mode (runlevel 1).|
|rc.M||Multiuser mode (runlevel 2 and 3), but with the standard text-based login. This is the default runlevel in Slackware.|
Runlevels 2, 3, and 4 will startup the network services if you have that enabled. The following files are responsible for the network initialization:
|rc.inetd||Starts up inetd, the BSD Internet super-daemon.|
|rc.inet1||This script is used to bring up the various network interfaces.|
|rc.inet1.conf||Modified by netconfig, this file is responsible for configuring the actual network interfaces.|
|rc.ip_forward||Activates IP packet forwarding.|
|rc.inet2||Runs after rc.inet1 and starts up basic network services.|
|rc.wireless||This script sets up PCI, USB, and 32-bit Cardbus wireless devices – NOT 16-bit PCMCIA cards (those are configured in /etc/pcmcia/).|
|rc.wireless.conf||Wireless LAN adapter configuration.|
|rc.bind||Starts up the BIND name server (named).|
|rc.httpd||Starts up the Apache web server.|
|rc.mysqld||Starts up the MySQL server.|
|rc.news||Starts up the news server.|
|rc.nfsd||Starts up the NFS server.|
|rc.portmap||Starts up the RPC portmapper.|
|rc.samba||Starts up Windows file and print sharing services.|
|rc.sshd||Starts up the secure shell server (sshd).|
System V Compatibility
Sflack includes System V init compatibility. Many other Linux distributions make use of this style instead of the BSD style. Basically each runlevel is given a subdirectory for init scripts, whereas BSD style gives one init script to each runlevel.
The rc.sysvinit script will search for any System V init scripts you have in /etc/rc.d and run them, if the runlevel is appropriate. This is useful for certain commercial software packages that install System V init scripts and scripts for BSD style init.
The scripts described below are the other system initialization scripts. They are typically run from one of the major scripts above, so all you need to do is edit the contents.
|rc.gpm||Starts up general purpose mouse services. Allows you to cut and paste at the Linux console.|
|rc.font||Loads the custom screen font for the console.|
|rc.local||Contains any specific startup commands for your system. This is empty after a fresh install, as it is reserved for local administrators. This script is run after all other initialization has taken place.|