<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-boot-bootscripts" role="wrap">
  <?dbhtml filename="bootscripts.html"?>

  <title>Bootscripts for CLFS &bootscripts-clfs-version;</title>

  <indexterm zone="ch-boot-bootscripts">
    <primary sortas="a-Bootscripts">Bootscripts</primary>
    <secondary>boot</secondary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>The Bootscripts package contains a set of scripts to
    start/stop the CLFS system at bootup/shutdown.</para>

  </sect2>

  <sect2 role="installation">
    <title>Installation of Bootscripts</title>

    <para os="p1">Apply a patch which modifies the scripts for use in
    <filename class="directory">/tools</filename>:</para>

<screen os="p2"><userinput>patch -Np1 -i ../&bootscripts-clfs-tools_updates-patch;</userinput></screen>

    <para os="a">Install the package:</para>

<screen os="b"><userinput>make DESTDIR=/tools install-minimal</userinput></screen>

  <para os="c">The <command>setclock</command> script reads the time from the
  hardware clock, also known as the BIOS or the Complementary Metal Oxide
  Semiconductor (CMOS) clock. If the hardware clock is set to UTC, this
  script will convert the hardware clock's time to the local time using
  the <filename>/tools/etc/sysconfig/clock</filename> file (which tells the
  <command>hwclock</command> program which timezone the user is in). There
  is no way to detect whether or not the hardware clock is set to UTC, so
  this needs to be configured manually.</para>



  <para os="d">If you do not know whether or not the hardware clock is set to UTC,
  you can find out after you have booted the new machine by running the
  <userinput>hwclock --localtime  --show</userinput> command, and if
  necessary editing the <filename>/tools/etc/sysconfig/clock</filename> file.
  The worst that will happen if you make a wrong guess here is that the
  time displayed will be wrong.</para>

  <para os="e">Change the value of the <envar>UTC</envar> variable below
  to a value of <option>0</option> (zero) if the hardware clock
  is <emphasis>not</emphasis> set to UTC time.</para>

<screen os="f"><userinput>cat &gt; /tools/etc/sysconfig/clock &lt;&lt; "EOF"
<literal># Begin /tools/etc/sysconfig/clock

UTC=1

# End /tools/etc/sysconfig/clock</literal>
EOF</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title/>

    <para>Details on this package are located in <xref
    linkend="contents-bootscripts" role="."/></para>

  </sect2>

</sect1>
