Browse Source

Update hosts file creation and explanatory text.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd@11071 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
DJ Lucas 9 năm trước cách đây
mục cha
commit
82d2dbe6c7
4 tập tin đã thay đổi với 61 bổ sung29 xóa
  1. 11 0
      chapter01/changelog.xml
  2. 32 27
      chapter07/network.xml
  3. 16 0
      chapter07/systemd-custom.xml
  4. 2 2
      general.ent

+ 11 - 0
chapter01/changelog.xml

@@ -35,6 +35,17 @@
       </itemizedlist>
     </listitem>
 -->
+    <listitem>
+      <para>2016-05-19</para>
+      <itemizedlist>
+        <listitem>
+          <para>[dj] - Adjust hosts file instructions to account for hosts
+          using automatic configuration. Ajusted eplanatory text to account for 
+          additional configurations.</para>
+        </listitem>
+     </itemizedlist>
+    </listitem>
+
     <listitem>
       <para>2016-05-18</para>
       <itemizedlist>

+ 32 - 27
chapter07/network.xml

@@ -197,11 +197,12 @@ EOF</userinput></screen>
        <primary sortas="d-network">network</primary>
        <secondary>/etc/hosts</secondary>
      </indexterm>
-   
-     <para>Decide on the IP address, fully-qualified domain name (FQDN), and
-     possible aliases for use in the <filename>/etc/hosts</filename> file. The
-     syntax is:</para>
-   
+
+     <para>Decide on a fully-qualified domain name (FQDN), and possible aliases
+     for use in the <filename>/etc/hosts</filename> file. If using static
+     addresses, you'll also need to decide on an IP address. The syntax
+     for a hosts file entry is:</para>
+
 <screen><literal>IP_address myhost.example.org aliases</literal></screen>
 
      <para>Unless the computer is to be visible to the Internet (i.e., there is
@@ -216,45 +217,49 @@ EOF</userinput></screen>
 
      <para>x can be any number in the range 16-31. y can be any number in the
      range 0-255.</para>
-   
+
      <para>A valid private IP address could be 192.168.1.1. A valid FQDN for
      this IP could be lfs.example.org.</para>
-   
+
      <para>Even if not using a network card, a valid FQDN is still required.
      This is necessary for certain programs to operate correctly.</para>
-   
-     <para>Create the  <filename>/etc/hosts</filename> file by running:</para>
+
+     <para>If using DHCP, DHCPv6, IPv6 Autoconfiguration, or if a network card
+     is not going to be configured, create the <filename>/etc/hosts</filename>
+     file by running the following command:</para>
 
 <screen><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"
-<literal># Begin /etc/hosts (network card version)
+<literal># Begin /etc/hosts
 
-127.0.0.1 localhost
-::1       localhost
-<replaceable>&lt;192.168.0.2&gt;</replaceable> <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable> <replaceable>[alias1] [alias2] ...</replaceable>
+127.0.0.1 <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable> localhost <replaceable>[alias1] [alias2] ...</replaceable>
+::1       <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable> localhost <replaceable>[alias1] [alias2] ...</replaceable>
 
-# End /etc/hosts (network card version)</literal>
+# End /etc/hosts</literal>
 EOF</userinput></screen>
 
-     <para>The <replaceable>&lt;192.168.0.2&gt;</replaceable> and
-     <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable> values need to be
-     changed for specific uses or requirements (if assigned an IP address by a
-     network/system administrator and the machine will be connected to an
-     existing network). The optional alias name(s) can be omitted.</para>
-   
-     <para>If a network card is not going to be configured, create the
-     <filename>/etc/hosts</filename> file by running:</para>
+     <para>The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents
+the IPv6 loopback interface.</para>
+
+     <para>If ussing a staic address, create the <filename>/etc/hosts</filename>
+     file by running this command instead:</para>
 
 <screen role="nodump"><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"
-<literal># Begin /etc/hosts (no network card version)
+<literal># Begin /etc/hosts
 
-127.0.0.1 <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable> localhost
+127.0.0.1 localhost
 ::1       localhost
+<replaceable>&lt;192.168.0.2&gt;</replaceable> <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable> <replaceable>[alias1] [alias2] ...</replaceable>
 
-# End /etc/hosts (no network card version)</literal>
+# End /etc/hosts</literal>
 EOF</userinput></screen>
 
-     <para>The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents the IPv6 loopback interface.</para>
-
+     <para>The <replaceable>&lt;192.168.0.2&gt;</replaceable>,
+     <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable>, and
+     <replaceable>&lt;HOSTNAME&gt;</replaceable> values need to be
+     changed for specific uses or requirements (if assigned an IP address by a
+     network/system administrator and the machine will be connected to an
+     existing network). The optional alias name(s) can be omitted.</para>
+   
    </sect2>
 
 </sect1>

+ 16 - 0
chapter07/systemd-custom.xml

@@ -120,4 +120,20 @@ EOF</userinput></screen>
 
   </sect2>
 
+<!--TBA
+  <sect2>
+    <title>Working with journalctl</title>
+
+    <para>Logging on a system booted with systemd is handled by the systemd
+    journal.</para>
+
+    <itemizedlist>
+       <listitem><para>journalctl -r </para></listitem>
+       <listitem><para>journalctl -u <replaceable>UNIT</replaceable></para></listitem>
+       <listitem><para>journalctl -b[=ID] -r</para></listitem>
+       <listitem><para>journalctl -f</para></listitem>
+    </itemizedlist>
+
+  </sect2>
+-->
 </sect1>

+ 2 - 2
general.ent

@@ -1,6 +1,6 @@
-<!ENTITY version         "20160518-systemd">
+<!ENTITY version         "20160519-systemd">
 <!ENTITY short-version   "systemd">  <!-- Used in dbus chapter, change to x.y for release -->
-<!ENTITY releasedate     "May 18th, 2016">
+<!ENTITY releasedate     "May 19th, 2016">
 <!ENTITY copyrightdate   "1999-2016"><!-- jhalfs needs a literal dash, not &ndash; -->
 <!ENTITY milestone       "7.10">
 <!ENTITY generic-version "systemd"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->