/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml

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

Revision 1.5 Revision 1.6
1<!-- The content of this document is licensed under the CC-BY-SA license --> 1<!-- The content of this document is licensed under the CC-BY-SA license -->
2<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 2<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
3 3
4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml,v 1.5 2003/12/10 14:23:36 swift Exp $ --> 4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml,v 1.6 2003/12/16 18:08:56 swift Exp $ -->
5 5
6<sections> 6<sections>
7<section> 7<section>
8<title>Runlevels</title> 8<title>Runlevels</title>
9<subsection> 9<subsection>
18</p> 18</p>
19 19
20<p> 20<p>
21First, your boot loader will load the kernel image you have defined in the 21First, your boot loader will load the kernel image you have defined in the
22boot loader configuration into memory after which it tells the CPU to run the 22boot loader configuration into memory after which it tells the CPU to run the
23kernel. When the kernel is loaded and run, it initialises all kernel-specific 23kernel. When the kernel is loaded and run, it initializes all kernel-specific
24structures and tasks and starts the <c>init</c> process. 24structures and tasks and starts the <c>init</c> process.
25</p> 25</p>
26 26
27<p> 27<p>
28This process then makes sure that all filesystems (defined in 28This process then makes sure that all filesystems (defined in
91si::sysinit:/sbin/rc sysinit 91si::sysinit:/sbin/rc sysinit
92</pre> 92</pre>
93 93
94<p> 94<p>
95This line tells <c>init</c> that it must run <c>/sbin/rc sysinit</c> to 95This line tells <c>init</c> that it must run <c>/sbin/rc sysinit</c> to
96initialise the system. The <path>/sbin/rc</path> script takes care of the 96initialize the system. The <path>/sbin/rc</path> script takes care of the
97initialisation, so you might say that <c>init</c> doesn't do much -- it 97initialisation, so you might say that <c>init</c> doesn't do much -- it
98delegates the task of initialising the system to another process. 98delegates the task of initialising the system to another process.
99</p> 99</p>
100 100
101<p> 101<p>
175 175
176<p> 176<p>
177In Gentoo, there are seven runlevels defined: three internal runlevels, and four 177In Gentoo, there are seven runlevels defined: three internal runlevels, and four
178user-defined runlevels. The internal runlevels are called <e>sysinit</e>, 178user-defined runlevels. The internal runlevels are called <e>sysinit</e>,
179<e>shutdown</e> and <e>reboot</e> and do exactly what their names imply: 179<e>shutdown</e> and <e>reboot</e> and do exactly what their names imply:
180initialise the system, powering off the system and rebooting the system. 180initialize the system, powering off the system and rebooting the system.
181</p> 181</p>
182 182
183<p> 183<p>
184The user-defined runlevels are those with an accompanying 184The user-defined runlevels are those with an accompanying
185<path>/etc/runlevels</path> subdirectory: <path>boot</path>, 185<path>/etc/runlevels</path> subdirectory: <path>boot</path>,
536<body> 536<body>
537 537
538<p> 538<p>
539Next to the <c>depend()</c> functionality, you also need to define the 539Next to the <c>depend()</c> functionality, you also need to define the
540<c>start()</c> function. This one contains all the commands necessary to 540<c>start()</c> function. This one contains all the commands necessary to
541initialise your service. It is adviseable to use the <c>ebegin</c> and 541initialize your service. It is adviseable to use the <c>ebegin</c> and
542<c>eend</c> functions to inform the user about what is happening: 542<c>eend</c> functions to inform the user about what is happening:
543</p> 543</p>
544 544
545<pre caption="Example start() function"> 545<pre caption="Example start() function">
546start() { 546start() {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20