/[gentoo]/xml/htdocs/doc/en/openrc-migration.xml
Gentoo

Diff of /xml/htdocs/doc/en/openrc-migration.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.15 Revision 1.22
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/openrc-migration.xml,v 1.15 2009/02/17 07:19:23 nightmorph Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/openrc-migration.xml,v 1.22 2011/01/13 03:39:04 robbat2 Exp $ -->
4 4
5<guide link="/doc/en/openrc-migration.xml"> 5<guide link="/doc/en/openrc-migration.xml">
6<title>Baselayout and OpenRC Migration Guide</title> 6<title>Baselayout and OpenRC Migration Guide</title>
7 7
8<author title="Author"> 8<author title="Author">
9 <mail link="cardoe"/> 9 <mail link="cardoe"/>
10</author> 10</author>
11<author title="Author"> 11<author title="Author">
12 <mail link="nightmorph"/> 12 <mail link="nightmorph"/>
13</author> 13</author>
14<author title="Author">
15 <mail link="robbat2"/>
16</author>
14<author title="Contributor"> 17<author title="Contributor">
15 <mail link="uberlord"/> 18 <mail link="uberlord"/>
16</author> 19</author>
17 20
18<abstract> 21<abstract>
22 25
23<!-- The content of this document is licensed under the CC-BY-SA license --> 26<!-- The content of this document is licensed under the CC-BY-SA license -->
24<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 27<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
25<license/> 28<license/>
26 29
27<version>1.9</version> 30<version>4</version>
28<date>2009-02-16</date> 31<date>2011-01-12</date>
29 32
30<chapter> 33<chapter>
31<title>Background</title> 34<title>Background</title>
35
36<!-- =============================================================== -->
32<section> 37<section>
33<title>What's baselayout?</title> 38<title>What's baselayout?</title>
34<body> 39<body>
35 40
36<p> 41<p>
40<path>/usr</path>, <path>/home</path> directories). 45<path>/usr</path>, <path>/home</path> directories).
41</p> 46</p>
42 47
43</body> 48</body>
44</section> 49</section>
50<!-- =============================================================== -->
51
45<section> 52<section>
46<title>What's OpenRC?</title> 53<title>What's OpenRC?</title>
47<body> 54<body>
48 55
49<p> 56<p>
51by the system, normally <path>/sbin/init</path>. However, it is <e>not</e> a 58by the system, normally <path>/sbin/init</path>. However, it is <e>not</e> a
52replacement for <path>/sbin/init</path>. The default init used by Gentoo Linux 59replacement for <path>/sbin/init</path>. The default init used by Gentoo Linux
53is <c>sys-apps/sysvinit</c>, while Gentoo/FreeBSD uses the FreeBSD init provided 60is <c>sys-apps/sysvinit</c>, while Gentoo/FreeBSD uses the FreeBSD init provided
54by <c>sys-freebsd/freebsd-sbin</c>. 61by <c>sys-freebsd/freebsd-sbin</c>.
55</p> 62</p>
63
56</body> 64</body>
57</section> 65</section>
66<!-- =============================================================== -->
67
58<section> 68<section>
59<title>So why migrate?</title> 69<title>So why migrate?</title>
60<body> 70<body>
61 71
62<p> 72<p>
83FreeBSD and NetBSD. 93FreeBSD and NetBSD.
84</p> 94</p>
85 95
86</body> 96</body>
87</section> 97</section>
98<!-- =============================================================== -->
99
88</chapter> 100</chapter>
89
90<chapter> 101<chapter>
91<title>Migration to OpenRC</title> 102<title>Migration to OpenRC</title>
103
104<!-- =============================================================== -->
92<section> 105<section>
93<body> 106<body>
94 107
95<p> 108<p>
96Migration to OpenRC is fairly straightforward; it will be pulled in as part of 109Migration to OpenRC is fairly straightforward; it will be pulled in as part of
108verify prior to rebooting. 121verify prior to rebooting.
109</p> 122</p>
110 123
111</body> 124</body>
112</section> 125</section>
126<!-- =============================================================== -->
113 127
114<section id="rc_conf"> 128<section id="rc_conf">
115<title>/etc/conf.d/rc</title> 129<title>/etc/conf.d/rc</title>
116<body> 130<body>
117 131
123delete <path>/etc/conf.d/rc</path>. 137delete <path>/etc/conf.d/rc</path>.
124</p> 138</p>
125 139
126</body> 140</body>
127</section> 141</section>
142<!-- =============================================================== -->
143
128<section id="modules"> 144<section id="modules">
129<title>Kernel modules</title> 145<title>Kernel modules</title>
130<body> 146<body>
131 147
132<p> 148<p>
161In the above examples, the modules and their parameters would only be passed 177In the above examples, the modules and their parameters would only be passed
162to 2.6.x series kernels. The new configuration allows for fine grained 178to 2.6.x series kernels. The new configuration allows for fine grained
163control over the modules and parameters based on kernel version. 179control over the modules and parameters based on kernel version.
164</p> 180</p>
165 181
182<impo>
183The <b>module*</b> variables are not cumulative. The more version-specific
184variables will override the more general variables.
185</impo>
186
187<note>
188Please note the difference between <b>module_</b> and <b>modules_</b>.
189</note>
190
166<p> 191<p>
167An in-depth example would be: 192An in-depth example would be:
168</p> 193</p>
169 194
170<pre caption="detailed example of /etc/conf.d/modules"> 195<pre caption="detailed example of /etc/conf.d/modules">
171<comment># Always load ochi1394 and ieee1394, no matter the kernel version</comment>
172modules="ohci1394 ieee1394"
173<comment># Only load tun and usbserial for 2.6.x series kernels</comment>
174modules_2_6="tun usbserial"
175<comment># Only load cx88_dvb for 2.6.23 kernels</comment>
176modules_2_6_23="cx88_dvb"
177<comment># Only load ivtv for 2.6.23-gentoo-r5</comment> 196<comment># Only load ivtv for 2.6.23-gentoo-r5</comment>
178modules_2_6_23_gentoo_r5="ivtv" 197modules_2_6_23_gentoo_r5="ivtv"
198<comment># Only load cx88_dvb for 2.6.23 kernels (other than -gentoo-r5)</comment>
199modules_2_6_23="cx88_dvb"
200<comment># Only load tun and usbserial for 2.6.x series kernels where x != 23</comment>
201modules_2_6="tun usbserial"
202<comment># Otherwise load ochi1394 and ieee1394</comment>
203modules="ohci1394 ieee1394"
179 204
180<comment># For 2.6.23-gentoo-r5, pass video_br=2 to cx88_dvb</comment> 205<comment># For 2.6.23-gentoo-r5, pass video_br=2 to cx88_dvb</comment>
181module_cx88_dvb_args_2_6_23_gentoo_r5="video_br=2" 206module_cx88_dvb_args_2_6_23_gentoo_r5="video_br=2"
182<comment># For 2.6.x series kernels, always pass vendor and product</comment> 207<comment># For 2.6.x series kernels, always pass vendor and product</comment>
183module_usbserial_args_2_6="vendor=0x1410 product=0x2110" 208module_usbserial_args_2_6="vendor=0x1410 product=0x2110"
184<comment># Always pass debug to ieee1394</comment> 209<comment># Always pass debug to ieee1394</comment>
185module_ieee1394_args="debug" 210module_ieee1394_args="debug"
186</pre> 211</pre>
187 212
188<note>
189Please note the difference between <b>module_</b> and <b>modules_</b>.
190</note>
191
192</body> 213</body>
193</section> 214</section>
215
216<!-- =============================================================== -->
194<section id="boot"> 217<section id="boot">
195<title>Boot runlevel</title> 218<title>Boot runlevel</title>
196<body> 219<body>
197 220
198<p> 221<p>
235<p> 258<p>
236If you know you use mdraid and lvm but do not see them above, you would run 259If you know you use mdraid and lvm but do not see them above, you would run
237the following to add initscripts to the <c>boot</c> runlevel: 260the following to add initscripts to the <c>boot</c> runlevel:
238</p> 261</p>
239 262
240<pre caption="Adding raid and lvm to the boot runlevel"> 263<pre caption="Adding mdraid and lvm to the boot runlevel">
241# <i>rc-update add raid boot</i> 264# <i>rc-update add mdraid boot</i>
242# <i>rc-update add lvm boot</i> 265# <i>rc-update add lvm boot</i>
243</pre> 266</pre>
244 267
245</body> 268</body>
246</section> 269</section>
270<!-- =============================================================== -->
271
247<section> 272<section>
248<title>Udev</title> 273<title>Udev</title>
249<body> 274<body>
250 275
251<p> 276<p>
269# <i>rc-update add udev sysinit</i> 294# <i>rc-update add udev sysinit</i>
270</pre> 295</pre>
271 296
272</body> 297</body>
273</section> 298</section>
299<!-- =============================================================== -->
300
274<section> 301<section>
275<title>Network</title> 302<title>Network</title>
276<body> 303<body>
277 304
278<p> 305<p>
291to re-add them. Simply replace <c>eth0</c> with the name of your network 318to re-add them. Simply replace <c>eth0</c> with the name of your network
292device. 319device.
293</p> 320</p>
294 321
295<p> 322<p>
296Also, <path>/etc/conf.d/net</path> no longer uses bash-style arrays for 323Also, <path>/etc/conf.d/net</path> (oldnet) no longer uses bash-style arrays
297configuration. Please review <path>/usr/share/doc/openrc/net.example</path> for 324for configuration. Please review
325<path>/usr/share/doc/openrc-&lt;version&gt;/net.example</path> for configuration
298configuration instructions. Conversion should be relatively straight-forward, 326instructions. Conversion should be relatively straight-forward, converting to
299for example a static IP assignment would change as follows: 327newlines for seperate entries, for example a static IP assignment would change
328as follows:
300</p> 329</p>
301 330
302<pre caption="Old /etc/conf.d/net style"> 331<pre caption="Old /etc/conf.d/net style">
303config_eth0=( "192.168.1.37 netmask 255.255.255.0 brd 192.168.1.255" ) 332config_eth0=( "192.168.1.37 netmask 255.255.255.0 brd 192.168.1.255" )
304routes_eth0=( "default via 192.168.1.100" ) 333routes_eth0=( "default via 192.168.1.100" "10.0.0.0/8 via 192.168.1.2" )
305</pre> 334</pre>
306 335
307<pre caption="New /etc/conf.d/net style"> 336<pre caption="New /etc/conf.d/net style">
308config_eth0="192.168.1.37 netmask 255.255.255.0 brd 192.168.1.255" 337config_eth0="192.168.1.37 netmask 255.255.255.0 brd 192.168.1.255"
309routes_eth0="default via 192.168.1.100" 338routes_eth0="default via 192.168.1.100
33910.0.0.0/8 via 192.168.1.2"
310</pre> 340</pre>
311 341
312</body> 342</body>
313</section> 343</section>
344<!-- =============================================================== -->
345
314<section> 346<section>
315<title>Clock</title> 347<title>Clock</title>
316<body> 348<body>
317 349
318<p> 350<p>
319Clock settings have been renamed from <path>/etc/conf.d/clock</path> to your 351Clock settings have been renamed from <path>/etc/conf.d/clock</path> to your
320system's native tool for adjusting the clock. This means on Linux it will be 352system's native tool for adjusting the clock. This means on Linux it will be
321<path>/etc/conf.d/hwclock</path> and on FreeBSD it will be 353<path>/etc/conf.d/hwclock</path> and on FreeBSD it will be
322<path>/etc/conf.d/adjkerntz</path>. The initscript in <path>/etc/init.d/</path> 354<path>/etc/conf.d/adjkerntz</path>. Systems without a working real time clock
323has also been renamed accordingly, so make sure it's in the appropriate 355(RTC) chip should use <path>/etc/init.d/swclock</path>, which sets the system
356time based on the mtime of a file which is created at system shutdown. The
357initscripts in <path>/etc/init.d/</path> have also been renamed accordingly, so
358make sure the appropriate script for your system has been added to the boot
324runlevel. 359runlevel.
325</p> 360</p>
326 361
327<p> 362<p>
328Additionally, the <c>TIMEZONE</c> variable is no longer in this file. Its 363Additionally, the <c>TIMEZONE</c> variable is no longer in this file. Its
341America/New_York 376America/New_York
342</pre> 377</pre>
343 378
344</body> 379</body>
345</section> 380</section>
381<!-- =============================================================== -->
382
346<section> 383<section>
347<title>XSESSION</title> 384<title>XSESSION</title>
348<body> 385<body>
349 386
350<p> 387<p>
368~/.bashrc</c>. 405~/.bashrc</c>.
369</impo> 406</impo>
370 407
371</body> 408</body>
372</section> 409</section>
410<!-- =============================================================== -->
411
373<section> 412<section>
374<title>EDITOR and PAGER</title> 413<title>EDITOR and PAGER</title>
375<body> 414<body>
376 415
377<p> 416<p>
388~/.bashrc</c>. 427~/.bashrc</c>.
389</impo> 428</impo>
390 429
391</body> 430</body>
392</section> 431</section>
432<!-- =============================================================== -->
433
393<section> 434<section>
394<title>Boot log</title> 435<title>Boot log</title>
395<body> 436<body>
396 437
397<p> 438<p>
407rc_logger="YES" 448rc_logger="YES"
408</pre> 449</pre>
409 450
410</body> 451</body>
411</section> 452</section>
453<!-- =============================================================== -->
454
412<section> 455<section>
413<title>Finishing up</title> 456<title>Finishing up</title>
414<body> 457<body>
415 458
416<p> 459<p>
420boot. 463boot.
421</p> 464</p>
422 465
423</body> 466</body>
424</section> 467</section>
468<!-- =============================================================== -->
469
470</chapter>
471<chapter>
472<title>Changed functionality</title>
473<!-- =============================================================== -->
474
475<section>
476<title>The pause action</title>
477<body>
478
479<p>
480Previously it was possible to temporarily stop a service without taking down all
481the depending services by using <c>/etc/init.d/service pause</c>. In OpenRC, the
482<c>pause</c> action was removed; this functionality is supported by the
483<c>/etc/init.d/service --nodeps stop</c>, which also works in the old
484baselayout.
485</p>
486
487</body>
488</section>
489<!-- =============================================================== -->
490
425</chapter> 491</chapter>
426</guide> 492</guide>

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.20