OSDN Git Service

clfs-3.0.0-sysvinit.
[clfsja/cross-lfs-ja.git] / src / system-config / common / usage.ch
1 %
2 % This is part of CLFSja package.
3 %
4 % This is a CTIE change file for the original XML source of the CLFSbook.
5 %
6 @x
7 <?xml version="1.0" encoding="ISO-8859-1"?>
8 @y
9 <?xml version="1.0" encoding="UTF-8"?>
10 @z
11
12 @x
13   <title>How Do These Bootscripts Work?</title>
14 @y
15   <title>Bootscripts はどのようにして動くのか </title>
16 @z
17
18 @x
19   <secondary>usage</secondary></indexterm>
20 @y
21   <secondary>利用方法</secondary></indexterm>
22 @z
23
24 @x
25   <para>Linux uses a special booting facility named SysVinit that is
26   based on a concept of <emphasis>run-levels</emphasis>. It can be quite
27   different from one system to another, so it cannot be assumed that
28   because things worked in one particular Linux distribution, they should work
29   the same in CLFS too. CLFS has its own way of doing things, but it
30   respects generally accepted standards.</para>
31 @y
32   <para>
33   Linux では SysVinit という特別なブート機能があり <emphasis>ランレベル (run-levels)</emphasis> という考え方に基づいています。
34   ランレベルの扱いはシステムによって異なりますので、ある Linux において動作しているからといって LFS においても全く同じように動くわけではありません。
35   LFS では独自の方法でこれを取り入れることにします。
36   ただし標準として受け入れられるような方法を取ります。
37   </para>
38 @z
39
40 @x
41   <para>SysVinit (which will be referred to as <quote>init</quote> from
42   now on) works using a run-levels scheme. There are seven (numbered 0 to 6)
43   run-levels (actually, there are more run-levels, but they are for
44   special cases and are generally not used. See <filename>init(8)</filename>
45   for more details), and each one of those corresponds to the actions the
46   computer is supposed to perform when it starts up. The default
47   run-level is 3. Here are the descriptions of the different run-levels
48   as they are implemented:</para>
49 @y
50   <para>
51   SysVinit (これ以降は<quote>init</quote>と表現します) はランレベルという仕組みにより動作します。
52   ランレベルには7つのレベル (0 から 6) があります。
53   (実際にはランレベルはそれ以上あるのですが、特殊な場合であって普通は利用されません。
54   詳しくは <filename>init(8)</filename> を参照してください。)
55   各レベルは、コンピューターの起動時における処理動作に対応づいており、デフォルトのランレベルは 3 となっています。
56   ランレベルの詳細を以下に説明します。
57   </para>
58 @z
59
60 @x
61 <literallayout>0: halt the computer
62 1: single-user mode
63 2: multi-user mode without networking
64 3: multi-user mode with networking
65 4: reserved for customization, otherwise does the same as 3
66 5: same as 4, it is usually used for GUI login (like X's <command>xdm</command> or KDE's <command>kdm</command>)
67 6: reboot the computer</literallayout>
68 @y
69 <literallayout>0: コンピューターの停止
70 1: シングルユーザーモード
71 2: マルチユーザーモード、ネットワークなし
72 3: マルチユーザーモード、ネットワークあり
73 4: 将来の拡張用として予約されています。 3 と同じものとして扱われます。
74 5: 4 と同様。通常 (X の <command>xdm</command> や KDE の <command>kdm</command> のような) GUI ログインに用いられます。
75 6: コンピューターの再起動</literallayout>
76 @z
77
78 @x
79   <para>The command used to change run-levels is <command>init
80   <replaceable>[runlevel]</replaceable></command>, where
81   <replaceable>[runlevel]</replaceable> is the target run-level. For example,
82   to reboot the computer, a user could issue the <command>init 6</command>
83   command, which is an alias for the <command>reboot</command> command.
84   Likewise, <command>init 0</command> is an alias for the
85   <command>halt</command> command.</para>
86 @y
87   <para>
88   ランレベルを変更するには <command>init <replaceable>&lt;runlevel&gt;</replaceable></command> を実行します。
89   <replaceable>&lt;runlevel&gt;</replaceable> はランレベルを示す数字です。
90   例えばコンピューターを再起動するには <command>init 6</command> コマンドを実行します。
91   これは <command>reboot</command> コマンドのエイリアスとなっています。
92   同様に <command>init 0</command> は <command>halt</command> のエイリアスです。
93   </para>
94 @z
95
96 @x
97   <para>There are a number of directories under <filename
98   class="directory">/etc/rc.d</filename> that look like <filename
99   class="directory">rc?.d</filename> (where ? is the number of the
100   run-level) and <filename class="directory">rcsysinit.d</filename>, all
101   containing a number of symbolic links. Some begin with a
102   <emphasis>K</emphasis>, the others begin with an
103   <emphasis>S</emphasis>, and all of them have two numbers following the
104   initial letter. The K means to stop (kill) a service and the S means
105   to start a service. The numbers determine the order in which the
106   scripts are run, from 00 to 99&mdash;the lower the number the earlier it
107   gets executed. When <command>init</command> switches to another run-level,
108   the appropriate services are either started or stopped, depending on the
109   runlevel chosen.</para>
110 @y
111   <para>
112   <filename class="directory">/etc/rc.d</filename> ディレクトリの配下には複数のサブディレクトリがあります。
113   そのディレクトリ名は <filename class="directory">rc?.d</filename> のようになっています。
114   (? はランレベルの数字を表します。)
115   また <filename class="directory">rcsysinit.d</filename> というサブディレクトリもあります。
116   それらサブディレクトリ内には数多くのシンボリックリンクがあります。
117   シンボリックリンクの先頭一文字には <emphasis>K</emphasis> や <emphasis>S</emphasis> が用いられ、続いて二桁の数値文字がつけられています。
118   K はサービスの停止 (kill)、S はサービスの起動 (start) を意味します。
119   二桁の数字はスクリプトの起動順を定めるもので、00 から 99 までが割振られ、小さな数字から順に実行されます。
120   <command>init</command> コマンドによってランレベルが変更される時は、そのランレベルに応じて必要なサービスが起動するか停止することになります。
121   </para>
122 @z
123
124 @x
125   <para>The real scripts are in <filename
126   class="directory">/etc/rc.d/init.d</filename>. They do the actual work,
127   and the symlinks all point to them. Killing links and starting links point
128   to the same script in <filename class="directory">/etc/rc.d/init.d</filename>.
129   This is because the scripts can be called with different parameters like
130   <option>start</option>, <option>stop</option>, <option>restart</option>,
131   <option>reload</option>, and <option>status</option>. When a K link is
132   encountered, the appropriate script is run with the <option>stop</option>
133   argument. When an S link is encountered, the appropriate script is run
134   with the <option>start</option> argument.</para>
135 @y
136   <para>
137   スクリプトファイルは <filename class="directory">/etc/rc.d/init.d</filename> ディレクトリにあります。
138   実際の処理はここにあるファイルが用いられます。
139   これらに対してはシンボリックリンクが用意されています。
140   サービスの起動 (S で始まる) と停止 (K で始まる) を行うシンボリックリンクは <filename
141   class="directory">/etc/rc.d/init.d</filename> ディレクトリにあるスクリプトを指し示しています。
142   このようにしているのは、各スクリプトが
143   <option>start</option>、
144   <option>stop</option>、
145   <option>restart</option>、
146   <option>reload</option>、
147   <option>status</option>
148   といったさまざまなパラメーターにより呼び出されるためです。
149   K の名前を持つシンボリックリンクが起動されるということは <option>stop</option> パラメーターをつけて該当するスクリプトが実行されるということです。
150   同様に S の名前を持つシンボリックリンクが起動されるということは <option>start</option> パラメーターをつけて呼び出されるということになります。
151   </para>
152 @z
153
154 @x
155   <para>There is one exception to this explanation. Links that start
156   with an <emphasis>S</emphasis> in the <filename
157   class="directory">rc0.d</filename> and <filename
158   class="directory">rc6.d</filename> directories will not cause anything
159   to be started. They will be called with the parameter
160   <option>stop</option> to stop something. The logic behind this
161   is that when a user is going to reboot or halt the system, nothing
162   needs to be started. The system only needs to be stopped.</para>
163 @y
164   <para>
165   上の説明には例外があります。
166   <filename class="directory">rc0.d</filename> ディレクトリと <filename
167   class="directory">rc6.d</filename> ディレクトリにある、<emphasis>S</emphasis> で始まるシンボリックリンクはサービスを何も起動させません。
168   <option>stop</option> パラメーターが与えられ、何らかのサービスを停止します。
169   ユーザーがシステムを再起動したり停止したりする際には、サービスを起動させる必要はないわけで、システムを停止するだけで済むからです。
170   </para>
171 @z
172
173 @x
174   <para>These are descriptions of what the arguments make the scripts
175   do:</para>
176 @y
177   <para>
178   スクリプトに対するパラメーターは以下のとおりです。
179   </para>
180 @z
181
182 @x start
183         <para>The service is started.</para>
184 @y
185         <para>サービスを起動します。</para>
186 @z
187
188 @x stop
189         <para>The service is stopped.</para>
190 @y
191         <para>サービスを停止します。</para>
192 @z
193
194 @x restart
195         <para>The service is stopped and then started again.</para>
196 @y
197         <para>サービスをいったん停止し再起動します。</para>
198 @z
199
200 @x reload
201         <para>The configuration of the service is updated. This is used
202         after the configuration file of a service was modified, when the
203         service does not need to be restarted.</para>
204 @y
205         <para>
206         サービスの設定ファイルを更新します。
207         設定ファイルが変更されたものの、サービスの再起動は必要ではない場合に利用します。
208         </para>
209 @z
210
211 @x status
212         <para>Tells if the service is running and with which PIDs.</para>
213 @y
214         <para>サービスがどの PID 値で動いているかを表示します。</para>
215 @z
216
217 @x
218   <para>Feel free to modify the way the boot process works (after all,
219   it is your own CLFS system). The files given here are an example of how
220   it can be done.</para>
221 @y
222   <para>
223   ブート機能を動作させる方法は自由に取り決めて設定して構いません。
224   このシステムはつまるところあなた自身のシステムだからです。
225   上に示したファイル類はブート機能を定めた一例に過ぎません。
226   </para>
227 @z