1 |
nightmorph 11/05/31 19:09:34 |
2 |
|
3 |
Modified: openrc-migration.xml |
4 |
Log: |
5 |
update openrc migration to version 9, [en] cvs version 1.29, thanks to naota on bug 366821 |
6 |
|
7 |
Revision Changes Path |
8 |
1.3 xml/htdocs/doc/ja/openrc-migration.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/ja/openrc-migration.xml?rev=1.3&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/ja/openrc-migration.xml?rev=1.3&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/ja/openrc-migration.xml?r1=1.2&r2=1.3 |
13 |
|
14 |
Index: openrc-migration.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/ja/openrc-migration.xml,v |
17 |
retrieving revision 1.2 |
18 |
retrieving revision 1.3 |
19 |
diff -u -r1.2 -r1.3 |
20 |
--- openrc-migration.xml 1 Aug 2010 14:15:32 -0000 1.2 |
21 |
+++ openrc-migration.xml 31 May 2011 19:09:34 -0000 1.3 |
22 |
@@ -1,6 +1,6 @@ |
23 |
<?xml version='1.0' encoding='UTF-8'?> |
24 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
25 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/ja/openrc-migration.xml,v 1.2 2010/08/01 14:15:32 shindo Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/ja/openrc-migration.xml,v 1.3 2011/05/31 19:09:34 nightmorph Exp $ --> |
27 |
|
28 |
<guide link="/doc/ja/openrc-migration.xml"> |
29 |
<title>BaselayoutとOpenRCの移行ガイド </title> |
30 |
@@ -11,13 +11,18 @@ |
31 |
<author title="Author"> |
32 |
<mail link="nightmorph"/> |
33 |
</author> |
34 |
+<author title="Author"> |
35 |
+ <mail link="robbat2"/> |
36 |
+</author> |
37 |
<author title="Contributor"> |
38 |
<mail link="uberlord"/> |
39 |
</author> |
40 |
<author title="翻訳"> |
41 |
<mail link="idani@×××××××××.jp">飴谷 シゲヒロ</mail> |
42 |
</author> |
43 |
- |
44 |
+<author title="翻訳"> |
45 |
+ <mail link="naota@g.o">青田直大</mail> |
46 |
+</author> |
47 |
|
48 |
<abstract> |
49 |
このガイドは、baselayout-1からbaselayout-2とOpenRCへの移行方法を説明します。 |
50 |
@@ -27,10 +32,10 @@ |
51 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
52 |
<license/> |
53 |
|
54 |
-<version>2</version> |
55 |
-<date>2010-07-20</date> |
56 |
+<version>9</version> |
57 |
+<date>2011-04-13</date> |
58 |
|
59 |
-<!--Original revision: 1.18 --> |
60 |
+<!--Original revision: 1.29 --> |
61 |
|
62 |
<chapter> |
63 |
<title>背景</title> |
64 |
@@ -152,23 +157,27 @@ |
65 |
新しい設定では、モジュールとパラメータをカーネルのバージョンまで指定することが可能となります。 |
66 |
</p> |
67 |
|
68 |
-<p> |
69 |
-より詳細な例を紹介します。 |
70 |
-</p> |
71 |
+<impo> |
72 |
+<b>module*</b>変数は、重複設定はできません。バージョン毎に指定された変数は、一般的な変数を上書きします。 |
73 |
+</impo> |
74 |
+ |
75 |
+<note> |
76 |
+<b>module_</b>と<b>modules_</b>は意味が違うので、注意してください。 |
77 |
+</note> |
78 |
|
79 |
<pre caption="/etc/conf.d/modulesの詳細な設定例"> |
80 |
-<comment># Always load ochi1394 and ieee1394, no matter the kernel version</comment> |
81 |
-<comment># カーネルのバージョンに関係なく、ochi1394とieee1394は常時ロード</comment> |
82 |
-modules="ohci1394 ieee1394" |
83 |
-<comment># Only load tun and usbserial for 2.6.x series kernels</comment> |
84 |
-<comment># 2.6.xシリーズのカーネルでのみ、tunとusbserailをロード</comment> |
85 |
-modules_2_6="tun usbserial" |
86 |
-<comment># Only load cx88_dvb for 2.6.23 kernels</comment> |
87 |
-<comment># cx88_dvbは2.6.23カーネルでのみロード</comment> |
88 |
-modules_2_6_23="cx88_dvb" |
89 |
<comment># Only load ivtv for 2.6.23-gentoo-r5</comment> |
90 |
<comment># ivtvは2.6.23-gentoo-r5でのみロード</comment> |
91 |
modules_2_6_23_gentoo_r5="ivtv" |
92 |
+<comment># Only load cx88_dvb for 2.6.23 kernels (other than -gentoo-r5)</comment> |
93 |
+<comment># cx88_dvbは2.6.23のみでロード(ただし-gentoo-r5は除く)</comment> |
94 |
+modules_2_6_23="cx88_dvb" |
95 |
+<comment># Only load tun and usbserial for 2.6.x series kernels where x != 23</comment> |
96 |
+<comment># 2.6.xシリーズ(x != 23)のカーネルでのみtunとusbserialをロード</comment> |
97 |
+modules_2_6="tun usbserial" |
98 |
+<comment># Otherwise load ochi1394 and ieee1394</comment> |
99 |
+<comment># それ以外ならochi1394とieee1394をロード</comment> |
100 |
+modules="ohci1394 ieee1394" |
101 |
|
102 |
<comment># For 2.6.23-gentoo-r5, pass video_br=2 to cx88_dvb</comment> |
103 |
<comment># 2.6.23-gentoo-r5でのみcx88_dvbにパラメータとしてvideo_br=2を渡す</comment> |
104 |
@@ -181,14 +190,6 @@ |
105 |
module_ieee1394_args="debug" |
106 |
</pre> |
107 |
|
108 |
-<impo> |
109 |
-<b>module*</b>変数は、重複設定はできません。バージョン毎に指定された変数は、一般的な変数を上書きします。 |
110 |
-</impo> |
111 |
- |
112 |
-<note> |
113 |
-<b>module_</b>と<b>modules_</b>は意味が違うので、注意してください。 |
114 |
-</note> |
115 |
- |
116 |
</body> |
117 |
</section> |
118 |
<section id="boot"> |
119 |
@@ -283,20 +284,23 @@ |
120 |
</p> |
121 |
|
122 |
<p> |
123 |
-また、<path>/etc/conf.d/net</path>の設定に、bashスタイルの配列は使用できなくなります。 |
124 |
+また、<path>/etc/conf.d/net</path>(oldnet)の設定に、bashスタイルの配列は使用できなくなります。 |
125 |
設定手順が記載されている<path>/usr/share/doc/openrc-<version>/net.example</path>を見直してください。 |
126 |
|
127 |
-設定の書き直しは、比較的簡単です。例えば、スタティックIPアドレスの設定は、以下のように変更となります。 |
128 |
+設定の書き直しは、比較的簡単です。(以下のroutes_eth0のように) |
129 |
+分離したエントリを書くには改行が必要になります。 |
130 |
+例えば、スタティックIPアドレスの設定は、以下のように変更となります。 |
131 |
</p> |
132 |
|
133 |
<pre caption="以前のスタイル/etc/conf.d/net"> |
134 |
config_eth0=( "192.168.1.37 netmask 255.255.255.0 brd 192.168.1.255" ) |
135 |
-routes_eth0=( "default via 192.168.1.100" ) |
136 |
+routes_eth0=( "default via 192.168.1.100" "10.0.0.0/8 via 192.168.1.2" ) |
137 |
</pre> |
138 |
|
139 |
<pre caption="新しいスタイルの/etc/conf.d/net"> |
140 |
config_eth0="192.168.1.37 netmask 255.255.255.0 brd 192.168.1.255" |
141 |
-routes_eth0="default via 192.168.1.100" |
142 |
+routes_eth0="default via 192.168.1.100 |
143 |
+10.0.0.0/8 via 192.168.1.2" |
144 |
</pre> |
145 |
|
146 |
</body> |
147 |
@@ -397,6 +401,91 @@ |
148 |
|
149 |
</body> |
150 |
</section> |
151 |
+<section id="rc_sys"> |
152 |
+<title>システムのsub-type: 仮想化の場合</title> |
153 |
+<body> |
154 |
+ |
155 |
+<p> |
156 |
+OpenRCの初期のバージョンでは、数種類の仮想化を検出し、 |
157 |
+<b>depend</b>関数の中で<b>keyword</b>を使って一部のinitスクリプトをスキップできるようにしていました。 |
158 |
+</p> |
159 |
+ |
160 |
+<p> |
161 |
+しかし、0.7.0からは<path>/etc/rc.conf</path>の<b>rc_sys</b>変数を自分でsub-typeにあわせて設定しなくてはいけません。 |
162 |
+sub-typeはそのルートのある仮想化環境によって変わります。 |
163 |
+一般的には空文字ではない<b>rc_sys</b>は仮想化の中で使われます。 |
164 |
+つまり、仮想化のホスト環境では<b>rc_sys=""</b>となります。 |
165 |
+</p> |
166 |
+ |
167 |
+<impo> |
168 |
+特別なsub-typeがなければデフォルトの空文字<b>""</b>を設定するようにしてください。 |
169 |
+この変数が設定されていなければ、警告が出て旧来の自動検出のアルゴリズムが使われます。 |
170 |
+</impo> |
171 |
+ |
172 |
+<note> |
173 |
+自動検出でどの値が使われるかわからなければ、一時的に<b>rc_sys</b>をコメントアウトして |
174 |
+<c>rc -S</c>で検出コマンドを実行してください。 |
175 |
+</note> |
176 |
+ |
177 |
+<pre caption="/etc/rc.confでシステムのsub-typeを「なし」に設定する"> |
178 |
+rc_sys="" |
179 |
+</pre> |
180 |
+ |
181 |
+<p> |
182 |
+新しいsub-typeの導入のため、また旧来の検出方法を信頼できなくなるカーネルの変更があったため、 |
183 |
+自動検出アルゴリズムを使うのではなく、手動の設定に置き換えなければなりませんでした。 |
184 |
+</p> |
185 |
+ |
186 |
+<table> |
187 |
+<tr> |
188 |
+ <th>sub-type</th> |
189 |
+ <th>説明</th> |
190 |
+ <th>補足</th> |
191 |
+</tr> |
192 |
+<tr> |
193 |
+ <ti></ti> |
194 |
+ <ti>デフォルト sub-typeなし</ti> |
195 |
+ <ti>設定なしと同じではない。 FreeBSD, Linux & NetBSD</ti> |
196 |
+</tr> |
197 |
+<tr> |
198 |
+ <ti>jail</ti> |
199 |
+ <ti>FreeBSDのjail</ti> |
200 |
+ <ti></ti> |
201 |
+</tr> |
202 |
+<tr> |
203 |
+ <ti>lxc</ti> |
204 |
+ <ti>Linux Containers</ti> |
205 |
+ <ti>自動検出されない</ti> |
206 |
+</tr> |
207 |
+<tr> |
208 |
+ <ti>openvz</ti> |
209 |
+ <ti>Linux OpenVZ</ti> |
210 |
+ <ti></ti> |
211 |
+</tr> |
212 |
+<tr> |
213 |
+ <ti>prefix</ti> |
214 |
+ <ti>Prefix</ti> |
215 |
+ <ti>自動検出されない。 FreeBSD, Linux & NetBSD</ti> |
216 |
+</tr> |
217 |
+<tr> |
218 |
+ <ti>vserver</ti> |
219 |
+ <ti>Linux vserver</ti> |
220 |
+ <ti></ti> |
221 |
+</tr> |
222 |
+<tr> |
223 |
+ <ti>xen0</ti> |
224 |
+ <ti>Xen0 Domain</ti> |
225 |
+ <ti>Linux & NetBSD</ti> |
226 |
+</tr> |
227 |
+<tr> |
228 |
+ <ti>xenU</ti> |
229 |
+ <ti>XenU Domain</ti> |
230 |
+ <ti>Linux & NetBSD</ti> |
231 |
+</tr> |
232 |
+</table> |
233 |
+ |
234 |
+</body> |
235 |
+</section> |
236 |
<section> |
237 |
<title>仕上げ</title> |
238 |
<body> |
239 |
@@ -410,4 +499,36 @@ |
240 |
</body> |
241 |
</section> |
242 |
</chapter> |
243 |
+ |
244 |
+<chapter> |
245 |
+<title>変更された機能</title> |
246 |
+<section> |
247 |
+<title>pause アクション</title> |
248 |
+<body> |
249 |
+ |
250 |
+<p> |
251 |
+以前は<c>/etc/init.d/service pause</c>で依存しているサービスの全てを止めることなく、 |
252 |
+一時的にサービスを停止することができました。 |
253 |
+OpenRCでは<c>pause</c>アクションは削除されました。 |
254 |
+<c>/etc/init.d/service --nodeps stop</c>で同じ機能が動きます。 |
255 |
+これは旧来のbaselayoutでも有効です。 |
256 |
+</p> |
257 |
+ |
258 |
+</body> |
259 |
+</section> |
260 |
+<section> |
261 |
+<title>/etc/mtabのrootfs項目</title> |
262 |
+<body> |
263 |
+ |
264 |
+<p> |
265 |
+以前は初期化時の<b>rootfs</b>項目は<path>/etc/mtab</path>から削除され、 |
266 |
+実際のルートの<path>/</path>の項目だけが残っていました。 |
267 |
+実際のルートと重複するrootfsの項目はシャットダウン時に再び戻されていました。 |
268 |
+OpenRCではinitramfsを完全にサポートするため、またtmpfs-on-rootをサポートするために、 |
269 |
+両方の項目が出てくるようになります。これによって、シャットダウン時の書きこみも少なくなります。 |
270 |
+</p> |
271 |
+ |
272 |
+</body> |
273 |
+</section> |
274 |
+</chapter> |
275 |
</guide> |