[b6b0bfb] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-scripts-bootscripts" role="wrap">
|
---|
| 9 | <?dbhtml filename="bootscripts.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Bootscripts for CLFS &bootscripts-clfs-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-scripts-bootscripts">
|
---|
| 14 | <primary sortas="a-Bootscripts">Bootscripts</primary>
|
---|
| 15 | <secondary>boot</secondary>
|
---|
| 16 | </indexterm>
|
---|
| 17 |
|
---|
| 18 | <sect2 role="package">
|
---|
| 19 | <title/>
|
---|
| 20 |
|
---|
| 21 | <para>The Bootscripts package contains a set of scripts to
|
---|
| 22 | start/stop the CLFS system at bootup/shutdown.</para>
|
---|
| 23 |
|
---|
| 24 | </sect2>
|
---|
| 25 |
|
---|
| 26 | <sect2 role="installation">
|
---|
| 27 | <title>Installation of Bootscripts</title>
|
---|
| 28 |
|
---|
| 29 | <para os="a">Install the package:</para>
|
---|
| 30 |
|
---|
| 31 | <screen os="b"><userinput>make DESTDIR=${CLFS} install-minimal</userinput></screen>
|
---|
| 32 |
|
---|
| 33 | <para os="c">The <command>setclock</command> script reads the time from the
|
---|
| 34 | hardware clock, also known as the BIOS or the Complementary Metal Oxide
|
---|
| 35 | Semiconductor (CMOS) clock. If the hardware clock is set to UTC, this
|
---|
| 36 | script will convert the hardware clock's time to the local time using
|
---|
| 37 | the <filename>/etc/localtime</filename> file (which tells the
|
---|
| 38 | <command>hwclock</command> program which timezone the user is in). There
|
---|
| 39 | is no way to detect whether or not the hardware clock is set to UTC, so
|
---|
| 40 | this needs to be configured manually.</para>
|
---|
| 41 |
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | <para os="d">If you do not know whether or not the hardware clock is set to UTC,
|
---|
| 45 | you can find out after you have booted the new machine by running the
|
---|
| 46 | <userinput>hwclock --localtime --show</userinput> command, and if
|
---|
| 47 | necessary editing the <filename>/etc/sysconfig/clock</filename> script.
|
---|
| 48 | The worst that will happen if you make a wrong guess here is that the
|
---|
| 49 | time displayed will be wrong.</para>
|
---|
| 50 |
|
---|
| 51 | <para os="e">Change the value of the <envar>UTC</envar> variable below
|
---|
| 52 | to a value of <option>0</option> (zero) if the hardware clock
|
---|
| 53 | is <emphasis>not</emphasis> set to UTC time.</para>
|
---|
| 54 |
|
---|
| 55 | <screen os="f"><userinput>cat > ${CLFS}/etc/sysconfig/clock << "EOF"
|
---|
| 56 | <literal># Begin /etc/sysconfig/clock
|
---|
| 57 |
|
---|
| 58 | UTC=1
|
---|
| 59 |
|
---|
| 60 | # End /etc/sysconfig/clock</literal>
|
---|
| 61 | EOF</userinput></screen>
|
---|
| 62 |
|
---|
| 63 | </sect2>
|
---|
| 64 |
|
---|
| 65 | <sect2 id="contents-bootscripts" role="content">
|
---|
| 66 | <title>Contents of Bootscripts</title>
|
---|
| 67 |
|
---|
| 68 | <segmentedlist>
|
---|
| 69 | <segtitle>Installed scripts</segtitle>
|
---|
| 70 |
|
---|
| 71 | <seglistitem>
|
---|
| 72 | <seg>checkfs, cleanfs, console, functions, halt, ifdown,
|
---|
| 73 | ifup, localnet, mountfs, mountkernfs, network, rc, reboot, sendsignals,
|
---|
| 74 | setclock, static, swap, sysklogd, template, and udev.</seg>
|
---|
| 75 | </seglistitem>
|
---|
| 76 | </segmentedlist>
|
---|
| 77 |
|
---|
| 78 | <variablelist>
|
---|
| 79 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 80 | <?dbfo list-presentation="list"?>
|
---|
| 81 | <?dbhtml list-presentation="table"?>
|
---|
| 82 |
|
---|
| 83 | <varlistentry id="checkfs-bootscripts">
|
---|
| 84 | <term><command>checkfs</command></term>
|
---|
| 85 | <listitem>
|
---|
| 86 | <para>Checks the integrity of the file systems before they are
|
---|
| 87 | mounted (with the exception of journal and network based file
|
---|
| 88 | systems)</para>
|
---|
| 89 | <indexterm zone="ch-scripts-bootscripts checkfs-bootscripts">
|
---|
| 90 | <primary sortas="d-checkfs">checkfs</primary>
|
---|
| 91 | </indexterm>
|
---|
| 92 | </listitem>
|
---|
| 93 | </varlistentry>
|
---|
| 94 |
|
---|
| 95 | <varlistentry id="cleanfs-bootscripts">
|
---|
| 96 | <term><command>cleanfs</command></term>
|
---|
| 97 | <listitem>
|
---|
| 98 | <para>Removes files that should not be preserved between reboots,
|
---|
| 99 | such as those in <filename class="directory">/var/run/</filename>
|
---|
| 100 | and <filename class="directory">/var/lock/</filename>; it re-creates
|
---|
| 101 | <filename>/var/run/utmp</filename> and removes the possibly present
|
---|
| 102 | <filename>/etc/nologin</filename>, <filename>/fastboot</filename>,
|
---|
| 103 | and <filename>/forcefsck</filename> files</para>
|
---|
| 104 | <indexterm zone="ch-scripts-bootscripts cleanfs-bootscripts">
|
---|
| 105 | <primary sortas="d-cleanfs">cleanfs</primary>
|
---|
| 106 | </indexterm>
|
---|
| 107 | </listitem>
|
---|
| 108 | </varlistentry>
|
---|
| 109 |
|
---|
| 110 | <varlistentry id="console-bootscripts">
|
---|
| 111 | <term><command>console</command></term>
|
---|
| 112 | <listitem>
|
---|
| 113 | <para>Loads the correct keymap table for the desired keyboard
|
---|
| 114 | layout; it also sets the screen font</para>
|
---|
| 115 | <indexterm zone="ch-scripts-bootscripts console-bootscripts">
|
---|
| 116 | <primary sortas="d-console">console</primary>
|
---|
| 117 | </indexterm>
|
---|
| 118 | </listitem>
|
---|
| 119 | </varlistentry>
|
---|
| 120 |
|
---|
| 121 | <varlistentry id="functions-bootscripts">
|
---|
| 122 | <term><command>functions</command></term>
|
---|
| 123 | <listitem>
|
---|
| 124 | <para>Contains common functions, such as error and status checking,
|
---|
| 125 | that are used by several bootscripts</para>
|
---|
| 126 | <indexterm zone="ch-scripts-bootscripts functions-bootscripts">
|
---|
| 127 | <primary sortas="d-functions">functions</primary>
|
---|
| 128 | </indexterm>
|
---|
| 129 | </listitem>
|
---|
| 130 | </varlistentry>
|
---|
| 131 |
|
---|
| 132 | <varlistentry id="halt-bootscripts">
|
---|
| 133 | <term><command>halt</command></term>
|
---|
| 134 | <listitem>
|
---|
| 135 | <para>Halts the system</para>
|
---|
| 136 | <indexterm zone="ch-scripts-bootscripts halt-bootscripts">
|
---|
| 137 | <primary sortas="d-halt">halt</primary>
|
---|
| 138 | </indexterm>
|
---|
| 139 | </listitem>
|
---|
| 140 | </varlistentry>
|
---|
| 141 |
|
---|
| 142 | <varlistentry id="ifdown-bootscripts">
|
---|
| 143 | <term><command>ifdown</command></term>
|
---|
| 144 | <listitem>
|
---|
| 145 | <para>Assists the network script with stopping network devices</para>
|
---|
| 146 | <indexterm zone="ch-scripts-bootscripts ifdown-bootscripts">
|
---|
| 147 | <primary sortas="d-ifdown">ifdown</primary>
|
---|
| 148 | </indexterm>
|
---|
| 149 | </listitem>
|
---|
| 150 | </varlistentry>
|
---|
| 151 |
|
---|
| 152 | <varlistentry id="ifup-bootscripts">
|
---|
| 153 | <term><command>ifup</command></term>
|
---|
| 154 | <listitem>
|
---|
| 155 | <para>Assists the network script with starting network devices</para>
|
---|
| 156 | <indexterm zone="ch-scripts-bootscripts ifup-bootscripts">
|
---|
| 157 | <primary sortas="d-ifup">ifup</primary>
|
---|
| 158 | </indexterm>
|
---|
| 159 | </listitem>
|
---|
| 160 | </varlistentry>
|
---|
| 161 |
|
---|
| 162 | <varlistentry id="localnet-bootscripts">
|
---|
| 163 | <term><command>localnet</command></term>
|
---|
| 164 | <listitem>
|
---|
| 165 | <para>Sets up the system's hostname and local loopback device</para>
|
---|
| 166 | <indexterm zone="ch-scripts-bootscripts localnet-bootscripts">
|
---|
| 167 | <primary sortas="d-localnet">localnet</primary>
|
---|
| 168 | </indexterm>
|
---|
| 169 | </listitem>
|
---|
| 170 | </varlistentry>
|
---|
| 171 |
|
---|
| 172 | <varlistentry id="mountfs-bootscripts">
|
---|
| 173 | <term><command>mountfs</command></term>
|
---|
| 174 | <listitem>
|
---|
| 175 | <para>Mounts all file systems, except ones that are marked
|
---|
| 176 | <emphasis>noauto</emphasis> or are network based</para>
|
---|
| 177 | <indexterm zone="ch-scripts-bootscripts mountfs-bootscripts">
|
---|
| 178 | <primary sortas="d-mountfs">mountfs</primary>
|
---|
| 179 | </indexterm>
|
---|
| 180 | </listitem>
|
---|
| 181 | </varlistentry>
|
---|
| 182 |
|
---|
| 183 | <varlistentry id="mountkernfs-bootscripts">
|
---|
| 184 | <term><command>mountkernfs</command></term>
|
---|
| 185 | <listitem>
|
---|
| 186 | <para>Mounts virtual kernel file systems, such as
|
---|
| 187 | <systemitem class="filesystem">proc</systemitem></para>
|
---|
| 188 | <indexterm zone="ch-scripts-bootscripts mountkernfs-bootscripts">
|
---|
| 189 | <primary sortas="d-mountkernfs">mountkernfs</primary>
|
---|
| 190 | </indexterm>
|
---|
| 191 | </listitem>
|
---|
| 192 | </varlistentry>
|
---|
| 193 |
|
---|
| 194 | <varlistentry id="network-bootscripts">
|
---|
| 195 | <term><command>network</command></term>
|
---|
| 196 | <listitem>
|
---|
| 197 | <para>Sets up network interfaces, such as network cards, and sets up
|
---|
| 198 | the default gateway (where applicable)</para>
|
---|
| 199 | <indexterm zone="ch-scripts-bootscripts network-bootscripts">
|
---|
| 200 | <primary sortas="d-network">network</primary>
|
---|
| 201 | </indexterm>
|
---|
| 202 | </listitem>
|
---|
| 203 | </varlistentry>
|
---|
| 204 |
|
---|
| 205 | <varlistentry id="rc-bootscripts">
|
---|
| 206 | <term><command>rc</command></term>
|
---|
| 207 | <listitem>
|
---|
| 208 | <para>The master run-level control script; it is responsible for
|
---|
| 209 | running all the other bootscripts one-by-one, in a sequence
|
---|
| 210 | determined by the name of the symbolic links being processed</para>
|
---|
| 211 | <indexterm zone="ch-scripts-bootscripts rc-bootscripts">
|
---|
| 212 | <primary sortas="d-rc">rc</primary>
|
---|
| 213 | </indexterm>
|
---|
| 214 | </listitem>
|
---|
| 215 | </varlistentry>
|
---|
| 216 |
|
---|
| 217 | <varlistentry id="reboot-bootscripts">
|
---|
| 218 | <term><command>reboot</command></term>
|
---|
| 219 | <listitem>
|
---|
| 220 | <para>Reboots the system</para>
|
---|
| 221 | <indexterm zone="ch-scripts-bootscripts reboot-bootscripts">
|
---|
| 222 | <primary sortas="d-reboot">reboot</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </listitem>
|
---|
| 225 | </varlistentry>
|
---|
| 226 |
|
---|
| 227 | <varlistentry id="sendsignals-bootscripts">
|
---|
| 228 | <term><command>sendsignals</command></term>
|
---|
| 229 | <listitem>
|
---|
| 230 | <para>Makes sure every process is terminated before the system reboots
|
---|
| 231 | or halts</para>
|
---|
| 232 | <indexterm zone="ch-scripts-bootscripts sendsignals-bootscripts">
|
---|
| 233 | <primary sortas="d-sendsignals">sendsignals</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
| 237 |
|
---|
| 238 | <varlistentry id="setclock-bootscripts">
|
---|
| 239 | <term><command>setclock</command></term>
|
---|
| 240 | <listitem>
|
---|
| 241 | <para>Resets the kernel clock to local time in case the hardware clock
|
---|
| 242 | is not set to UTC time</para>
|
---|
| 243 | <indexterm zone="ch-scripts-bootscripts setclock-bootscripts">
|
---|
| 244 | <primary sortas="d-setclock">setclock</primary>
|
---|
| 245 | </indexterm>
|
---|
| 246 | </listitem>
|
---|
| 247 | </varlistentry>
|
---|
| 248 |
|
---|
| 249 | <varlistentry id="static-bootscripts">
|
---|
| 250 | <term><command>static</command></term>
|
---|
| 251 | <listitem>
|
---|
| 252 | <para>Provides the functionality needed to assign a static Internet
|
---|
| 253 | Protocol (IP) address to a network interface</para>
|
---|
| 254 | <indexterm zone="ch-scripts-bootscripts static-bootscripts">
|
---|
| 255 | <primary sortas="d-static">static</primary>
|
---|
| 256 | </indexterm>
|
---|
| 257 | </listitem>
|
---|
| 258 | </varlistentry>
|
---|
| 259 |
|
---|
| 260 | <varlistentry id="swap-bootscripts">
|
---|
| 261 | <term><command>swap</command></term>
|
---|
| 262 | <listitem>
|
---|
| 263 | <para>Enables and disables swap files and partitions</para>
|
---|
| 264 | <indexterm zone="ch-scripts-bootscripts swap-bootscripts">
|
---|
| 265 | <primary sortas="d-swap">swap</primary>
|
---|
| 266 | </indexterm>
|
---|
| 267 | </listitem>
|
---|
| 268 | </varlistentry>
|
---|
| 269 |
|
---|
| 270 | <varlistentry id="sysklogd-bootscripts">
|
---|
| 271 | <term><command>sysklogd</command></term>
|
---|
| 272 | <listitem>
|
---|
| 273 | <para>Starts and stops the system and kernel log daemons</para>
|
---|
| 274 | <indexterm zone="ch-scripts-bootscripts sysklogd-bootscripts">
|
---|
| 275 | <primary sortas="d-sysklogd">sysklogd</primary>
|
---|
| 276 | </indexterm>
|
---|
| 277 | </listitem>
|
---|
| 278 | </varlistentry>
|
---|
| 279 |
|
---|
| 280 | <varlistentry id="template-bootscripts">
|
---|
| 281 | <term><command>template</command></term>
|
---|
| 282 | <listitem>
|
---|
| 283 | <para>A template to create custom bootscripts for other
|
---|
| 284 | daemons</para>
|
---|
| 285 | <indexterm zone="ch-scripts-bootscripts template-bootscripts">
|
---|
| 286 | <primary sortas="d-template">template</primary>
|
---|
| 287 | </indexterm>
|
---|
| 288 | </listitem>
|
---|
| 289 | </varlistentry>
|
---|
| 290 |
|
---|
| 291 | <varlistentry id="eudev-bootscripts">
|
---|
| 292 | <term><command>udev</command></term>
|
---|
| 293 | <listitem>
|
---|
| 294 | <para>Starts and stops the Eudev daemon</para>
|
---|
| 295 | <indexterm zone="ch-scripts-bootscripts eudev-bootscripts">
|
---|
| 296 | <primary sortas="d-eudev">udev</primary>
|
---|
| 297 | </indexterm>
|
---|
| 298 | </listitem>
|
---|
| 299 | </varlistentry>
|
---|
| 300 |
|
---|
| 301 | </variablelist>
|
---|
| 302 |
|
---|
| 303 | </sect2>
|
---|
| 304 |
|
---|
| 305 | </sect1>
|
---|