Changeset b568bbaf for chapter07/usage.xml
- Timestamp:
- 07/02/2005 05:16:45 PM (19 years ago)
- Branches:
- 6.1, 6.1.1
- Children:
- b8a3fb2
- Parents:
- 464fa64f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/usage.xml
r464fa64f rb568bbaf 12 12 <secondary>usage</secondary></indexterm> 13 13 14 <para>Linux uses a special booting facility named SysVinit that is 15 based on a concept of <emphasis>run-levels</emphasis>. It can be quite 16 different from one system to another, so it cannot be assumed that 17 because things worked in <insert distro name>, they should work 18 the same in LFS too. LFS has its own way of doing things, but it 19 respects generally accepted standards.</para> 14 <para>Linux uses a special booting facility named SysVinit that is based on a 15 concept of <emphasis>run-levels</emphasis>. It can be quite different from one 16 system to another, so it cannot be assumed that because things worked in one 17 particular Linux distribution, they should work the same in LFS too. LFS has its 18 own way of doing things, but it respects generally accepted standards.</para> 20 19 21 <para>SysVinit (which will be referred to as <quote>init</quote> from 22 now on) works using a run-levels scheme. There are seven (from 0 to 6) 23 run-levels (actually, there are more run-levels, but they are for 24 special cases and are generally not used. The init man page describes 25 those details), and each one of those corresponds to the actions the 26 computer is supposed to perform when it starts up. The default 27 run-level is 3. Here are the descriptions of the different run-levels 28 as they are implemented:</para> 20 <para>SysVinit (which will be referred to as <quote>init</quote> from now on) 21 works using a run-levels scheme. There are seven (from 0 to 6) run-levels 22 (actually, there are more run-levels, but they are for special cases and are 23 generally not used. The init manual page describes those details), and each one 24 of those corresponds to the actions the computer is supposed to perform when it 25 starts up. The default run-level is 3. Here are the descriptions of the 26 different run-levels as they are implemented:</para> 29 27 30 28 <literallayout>0: halt the computer … … 38 36 <para>The command used to change run-levels is <command>init 39 37 <replaceable>[runlevel]</replaceable></command>, where 40 <replaceable>[runlevel]</replaceable> is the target run-level. For 41 example, to reboot the computer, a user would issue the <command>init 42 6</command> command. The <command>reboot</command> command is an 43 alias for it, as is the <command>halt</command> command an alias for 44 <command>init 0</command>.</para>38 <replaceable>[runlevel]</replaceable> is the target run-level. For example, to 39 reboot the computer, a user could issue the <command>init 6</command> command, 40 which is an alias for the <command>reboot</command> command. Likewise, 41 <command>init 0</command> is an alias for the <command>halt</command> 42 command.</para> 45 43 46 44 <para>There are a number of directories under <filename 47 45 class="directory">/etc/rc.d</filename> that look like <filename 48 class="directory">rc?.d</filename> (where ? is the number of the 49 run-level) and <filename class="directory">rcsysinit.d</filename>, all 50 containing a number of symbolic links. Some begin with a 51 <emphasis>K</emphasis>, the others begin with an 52 <emphasis>S</emphasis>, and all of them have two numbers following the 53 initial letter. The K means to stop (kill) a service and the S means 54 to start a service. The numbers determine the order in which the 55 scripts are run, from 00 to 99—the lower the number the earlier it 56 gets executed. When init switches to another run-level, the 57 appropriate services get killed and others get started.</para> 46 class="directory">rc?.d</filename> (where ? is the number of the run-level) and 47 <filename class="directory">rcsysinit.d</filename>, all containing a number of 48 symbolic links. Some begin with a <emphasis>K</emphasis>, the others begin with 49 an <emphasis>S</emphasis>, and all of them have two numbers following the 50 initial letter. The K means to stop (kill) a service and the S means to start a 51 service. The numbers determine the order in which the scripts are run, from 00 52 to 99—the lower the number the earlier it gets executed. When 53 <command>init</command> switches to another run-level, the appropriate services 54 are either started or stopped, depending on the runlevel chosen.</para> 58 55 59 56 <para>The real scripts are in <filename
Note:
See TracChangeset
for help on using the changeset viewer.