from runlevel 5 into runlevel 3

Hello,

I switch with init 3 from runlevel 5 into runlevel 3, however.

Which scripts(general) starts one after other?

Your question is not very clear to me. You may use a few more words to describe it.

When you go from runlevel 5 to 3, for those things that are intended to run in runlevel 5, but not in 3 will be stopped (by running their K… script). And those that have to run in runlevel 3, but not in 5 (there will not be many of them, generaly in 5 there will be those in 3 and some more) will be started (by running their S… script). Is this what you ment to ask for?

The K… scripts are run in the sequence they are found iin the directory, that is alphabetic, that is they are run in the numbered sequence .e.g. K10apache2 is run before K11nfsserver. The same for the S… scripts.

Hi,

just to clarify it is not alphabetic but the sequence number that determines the script order. lowest number first.

The english is only there for us humans to aid recognition, the scripts will execute quite happily without it.

ta
J

Well it’s just the normal collation sequence for the character set. Because the numeric field is always 2 digits, so the natural collation is first on the number, then on the following name as tiebreaker. Nowhere in the running script is there a need to explicit break up the script name into the numeric and name portions for the purpose of ordering. The order would be something like this.

S01something
S02asomething
S02tsomething

I used the word alphabetic to make myself better understandable for the OP. The word collating sequence (as ken_yap uses it) is more formal and correct. What you call ‘english’ has nothing to do with any language at all. They are just characters that contribute to the sequence. In an Unicode/UTF-8 environment they could also be tibetan characters spelling a sanscrit word. In other words they are executed in the same sequence as an ls S* will normaly show them. See ken_yap’s example.