[f874424] | 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 | <!ENTITY site SYSTEM "../appendices/rc.site.script">
|
---|
| 6 | %general-entities;
|
---|
| 7 | ]>
|
---|
| 8 |
|
---|
| 9 | <sect1 id="ch-scripts-site">
|
---|
| 10 | <?dbhtml filename="site.html"?>
|
---|
| 11 |
|
---|
| 12 | <title>The rc.site File</title>
|
---|
| 13 |
|
---|
| 14 | <indexterm zone="ch-scripts-site">
|
---|
| 15 | <primary sortas="a-rc.site">rc.site</primary>
|
---|
| 16 | </indexterm>
|
---|
| 17 |
|
---|
| 18 | <para>The optional <filename>/etc/sysconfig/rc.site</filename> file contains
|
---|
| 19 | settings that are automatically set for each boot script. It can alternatively
|
---|
| 20 | set the values specified in the <filename>hostname</filename>,
|
---|
| 21 | <filename>console</filename>, and <filename>clock</filename> files in the
|
---|
| 22 | <filename class='directory'>/etc/sysconfig/</filename> directory. If the
|
---|
| 23 | associated variables are present in both these separate files and
|
---|
| 24 | <filename>rc.site</filename>, the values in the script specific files have
|
---|
| 25 | precedence. </para>
|
---|
| 26 |
|
---|
[2ca8941] | 27 | <para><filename>rc.site</filename> also contains parameters that can
|
---|
[f874424] | 28 | customize other aspects of the boot process. Setting the IPROMPT variable
|
---|
| 29 | will enable selective running of bootscripts. Other options are described
|
---|
| 30 | in the file comments. The default version of the file is as follows:</para>
|
---|
| 31 |
|
---|
[a7f0b27] | 32 | <!-- Use role to fix a pdf generation problem -->
|
---|
| 33 | <screen role="auto">&site;</screen>
|
---|
[f874424] | 34 |
|
---|
[12574f2] | 35 | <sect2>
|
---|
| 36 | <title>Customizing the Boot and Shutdown Scripts</title>
|
---|
| 37 |
|
---|
| 38 | <para>The LFS boot scripts boot and shut down a system in a fairly
|
---|
| 39 | efficient manner, but there are a few tweaks that you can make in the
|
---|
[ea011f47] | 40 | rc.site file to improve speed even more and to adjust messages according
|
---|
[12574f2] | 41 | to your preferences. To do this, adjust the settings in
|
---|
| 42 | the <filename>/etc/sysconfig/rc.site</filename> file above.</para>
|
---|
| 43 |
|
---|
| 44 | <itemizedlist>
|
---|
| 45 |
|
---|
| 46 | <listitem><para>During the boot script <filename>udev</filename>, there is
|
---|
| 47 | a call to <command>udev settle</command> that requires some time to
|
---|
| 48 | complete. This time may or may not be required depending on devices present
|
---|
| 49 | in the system. If you only have simple partitions and a single ethernet
|
---|
| 50 | card, the boot process will probably not need to wait for this command. To
|
---|
| 51 | skip it, set the variable OMIT_UDEV_SETTLE=y.</para></listitem>
|
---|
| 52 |
|
---|
| 53 | <listitem><para>The boot script <filename>udev_retry</filename> also runs
|
---|
| 54 | <command>udev settle</command> by default. This command is only needed by
|
---|
| 55 | default if the <filename class='directory'>/var</filename> directory is
|
---|
| 56 | separately mounted. This is because the clock needs the file
|
---|
| 57 | <filename>/var/lib/hwclock/adjtime</filename>. Other customizations may
|
---|
| 58 | also need to wait for udev to complete, but in many installations it is not
|
---|
| 59 | needed. Skip the command by setting the variable OMIT_UDEV_RETRY_SETTLE=y.
|
---|
| 60 | </para></listitem>
|
---|
| 61 |
|
---|
| 62 | <listitem><para>By default, the file system checks are silent. This can
|
---|
| 63 | appear to be a delay during the bootup process. To turn on the
|
---|
| 64 | <command>fsck</command> output, set the variable VERBOSE_FSCK=y.
|
---|
| 65 | </para></listitem>
|
---|
| 66 |
|
---|
| 67 | <listitem><para>When rebooting, you may want to skip the filesystem check,
|
---|
| 68 | <command>fsck</command>, completely. To do this, either create the file
|
---|
| 69 | <filename>/fastboot</filename> or reboot the system with the command
|
---|
| 70 | <command>/sbin/shutdown -f -r now</command>. On the other hand, you can
|
---|
| 71 | force all file systems to be checked by creating
|
---|
| 72 | <filename>/forcefsck</filename> or running <command>shutdown</command> with
|
---|
[2ca8941] | 73 | the <parameter>-F</parameter> parameter instead of <parameter>-f</parameter>.
|
---|
[12574f2] | 74 | </para>
|
---|
[2ca8941] | 75 |
|
---|
[12574f2] | 76 | <para>Setting the variable FASTBOOT=y will disable <command>fsck</command>
|
---|
[2ca8941] | 77 | during the boot process until it is removed. This is not recommended
|
---|
[12574f2] | 78 | on a permanent basis.</para></listitem>
|
---|
| 79 |
|
---|
| 80 | <listitem><para>Normally, all files in the <filename
|
---|
| 81 | class='directory'>/tmp</filename> directory are deleted at boot time.
|
---|
| 82 | Depending on the number of files or directories present, this can cause a
|
---|
[ea011f47] | 83 | noticeable delay in the boot process. To skip removing these files set the
|
---|
[12574f2] | 84 | variable SKIPTMPCLEAN=y.</para></listitem>
|
---|
| 85 |
|
---|
| 86 | <listitem><para>During shutdown, the <command>init</command> program sends
|
---|
| 87 | a TERM signal to each program it has started (e.g. agetty), waits for a set
|
---|
| 88 | time (default 3 seconds), and sends each process a KILL signal and waits
|
---|
| 89 | again. This process is repeated in the <command>sendsignals</command>
|
---|
| 90 | script for any processes that are not shut down by their own scripts. The
|
---|
| 91 | delay for <command>init</command> can be set by passing a parameter. For
|
---|
| 92 | example to remove the delay in <command>init</command>, pass the -t0
|
---|
| 93 | parameter when shutting down or rebooting (e.g. <command>/sbin/shutdown
|
---|
| 94 | -t0 -r now</command>). The delay for the <command>sendsignals</command>
|
---|
| 95 | script can be skipped by setting the parameter
|
---|
| 96 | KILLDELAY=0.</para></listitem>
|
---|
| 97 |
|
---|
| 98 | </itemizedlist>
|
---|
| 99 |
|
---|
| 100 | </sect2>
|
---|
| 101 |
|
---|
[f874424] | 102 | </sect1>
|
---|
| 103 |
|
---|