RUNLEVELS
As your system boots-up it goes through several "run-levels"
We're going to shed some light on how all this works, not changing
anything yet, just having a quick peek.
There are 7 different run-levels:
0.) Shutdown, complete stop
1.) Single user mode, only for troubleshooting and system recovery
2.) Multi-user mode, without networking
3.) Multi-user mode, with networking
4.) Not used, you could create your own runlevel here
( ! In Slackware
like 5 ! )
5.) Multi-user mode with GUI, your normal X desktop
( ! Not in
Slackware ! )
6.) Restart
O.K. we're starting the tour, not using the
console this time but by simply clicking a few icons
Home --> /etc --> /rc.d ( rc.d ! not the other rc's !! )
Now, here you'll see them: "/rc0" to "/rc6" and some special files like
"rc.local" and "rc.sysinit".
Click
on "rc5" to open it; here you'll see a bunch of symbolic-links (
shortcuts ) they all are linked to a program to start or stop in
runlevel 5. Have a good look, you will notice they start with a "K" or"
S" and a number. The number gives the order of execution the "K" stands
for Kill the "S" for Start. ( some services started earlier or in other
runlevels are stopped here, because the only had to run to boot the
system. )
We go one step back to /etc/rc.d and have a look at
the "rc.local" file, right-click on it and choose "Preview in Embedded
KDE Advanced Text Editor Component" that's a safe way to have see the
file.
"rc.local" is a script where you could add
your own lines of
code at the bottom in order to get a program started at boot in the
last runlevel. ( see the "#!/bin/sh" on the first line ? This is no
bash script but a shell script ! )
NOTE:
remember the Multi Media key's ? There we did put a script in
"~/.kde/Autostart", in order to startup with KDE. This is useless if
you run a more exotic window manager ! In that case "rc.local" is the
place to add the code.
The file "rc.sysinit" also located in
/etc/rc.d controls the runlevel procedure and is the first file loaded
at boot, so you better don't fidddle around with this one !!! Preview
in the "Embedded KDE Advanced Text Editor Component" can't hurt though
! The "rc.sysinit" look familiar and starts with "#!/bin/bash" we know
that one already ! While you're at it look at the "rc" and "rc.modules"
too, they speak for themselves.
Now you know what's going on as you boot your
system !

Bruno
-- May 2 2003 ( Revised Dec 12 2005 ) --