[lfs-book] r10404 - in branches/systemd/BOOK: . chapter01 chapter06 chapter07 network-scripts/lfs/units

krejzi at higgs.linuxfromscratch.org krejzi at higgs.linuxfromscratch.org
Sat Dec 21 11:46:16 PST 2013


Author: krejzi
Date: Sat Dec 21 11:46:16 2013
New Revision: 10404

Log:
Misc updates.

Modified:
   branches/systemd/BOOK/chapter01/changelog.xml
   branches/systemd/BOOK/chapter06/attr.xml
   branches/systemd/BOOK/chapter06/bc.xml
   branches/systemd/BOOK/chapter06/dbus.xml
   branches/systemd/BOOK/chapter06/gperf.xml
   branches/systemd/BOOK/chapter06/systemd.xml
   branches/systemd/BOOK/chapter07/network.xml
   branches/systemd/BOOK/general.ent
   branches/systemd/BOOK/network-scripts/lfs/units/ifupdownat.service

Modified: branches/systemd/BOOK/chapter01/changelog.xml
==============================================================================
--- branches/systemd/BOOK/chapter01/changelog.xml	Sat Dec 21 04:01:40 2013	(r10403)
+++ branches/systemd/BOOK/chapter01/changelog.xml	Sat Dec 21 11:46:16 2013	(r10404)
@@ -39,6 +39,14 @@
       <para>2013-12-21</para>
       <itemizedlist>
         <listitem>
+          <para>[krejzi] - Update Systemd instructions and contents
+          for latest version of Systemd.</para>
+        </listitem>
+        <listitem>
+          <para>[krejzi] - Update network configuration page to
+          use LFS Systemd specific network configuration.</para>
+        </listitem>
+        <listitem>
           <para>[krejzi] - Merge LFS SVN-20131216 book.</para>
         </listitem>
       </itemizedlist>

Modified: branches/systemd/BOOK/chapter06/attr.xml
==============================================================================
--- branches/systemd/BOOK/chapter06/attr.xml	Sat Dec 21 04:01:40 2013	(r10403)
+++ branches/systemd/BOOK/chapter06/attr.xml	Sat Dec 21 11:46:16 2013	(r10404)
@@ -46,6 +46,11 @@
 
 <screen><userinput remap="pre">sed -i -e 's|/@pkg_name@|&- at pkg_version@|' include/builddefs.in</userinput></screen>
 
+    <para>Prevent installation of manual pages that were already installed by
+    Man-Pages package:</para>
+
+<screen><userinput remap="pre">sed -i -e "/SUBDIRS/s|man2||" man/Makefile</userinput></screen>
+
     <para>Prepare Attr for compilation:</para>
 
 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>

Modified: branches/systemd/BOOK/chapter06/bc.xml
==============================================================================
--- branches/systemd/BOOK/chapter06/bc.xml	Sat Dec 21 04:01:40 2013	(r10403)
+++ branches/systemd/BOOK/chapter06/bc.xml	Sat Dec 21 11:46:16 2013	(r10404)
@@ -43,7 +43,9 @@
 
     <para>Prepare Bc for compilation:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr --with-readline</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr   \
+            --with-readline \
+            --mandir=/usr/share/man</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>

Modified: branches/systemd/BOOK/chapter06/dbus.xml
==============================================================================
--- branches/systemd/BOOK/chapter06/dbus.xml	Sat Dec 21 04:01:40 2013	(r10403)
+++ branches/systemd/BOOK/chapter06/dbus.xml	Sat Dec 21 11:46:16 2013	(r10404)
@@ -93,7 +93,7 @@
     <para>Create a symlink, so that D-Bus and Systemd can use the same
     <filename>machine-id</filename> file:</para>
 
-<screen><userinput>ln -s /etc/machine-id /var/lib/dbus</userinput></screen>
+<screen><userinput remap="install">ln -sv /etc/machine-id /var/lib/dbus</userinput></screen>
 
   </sect2>
 

Modified: branches/systemd/BOOK/chapter06/gperf.xml
==============================================================================
--- branches/systemd/BOOK/chapter06/gperf.xml	Sat Dec 21 04:01:40 2013	(r10403)
+++ branches/systemd/BOOK/chapter06/gperf.xml	Sat Dec 21 11:46:16 2013	(r10404)
@@ -42,7 +42,8 @@
 
     <para>Prepare Gperf for compilation:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/gperf-&gperf-version;</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr \
+            --docdir=/usr/share/doc/gperf-&gperf-version;</userinput></screen>
 
     <para>Compile the package:</para>
 

Modified: branches/systemd/BOOK/chapter06/systemd.xml
==============================================================================
--- branches/systemd/BOOK/chapter06/systemd.xml	Sat Dec 21 04:01:40 2013	(r10403)
+++ branches/systemd/BOOK/chapter06/systemd.xml	Sat Dec 21 11:46:16 2013	(r10404)
@@ -57,7 +57,7 @@
       <title>The meaning of the configure options:</title>
 
       <varlistentry>
-        <term><parameter>--with-root*</parameter></term>
+        <term><parameter>--with-root-*</parameter></term>
         <listitem>
           <para>These switches ensure that core programs and
           shared libraries are installed in the subdirectories
@@ -95,11 +95,24 @@
 
 <screen><userinput remap="install">make install</userinput></screen>
 
+    <para>Install manual pages which are shipped in the tarball, but were
+    not installed by install process:</para>
+
+<screen><userinput remap="install">for cat in 1 3 5 7 8
+do
+  install -v -m644 man/*.${cat} /usr/share/man/man${cat}
+done</userinput></screen>
+
+    <para>Move NSS myhostname library to <filename
+    class="directory">/lib</filename>:</para>
+
+<screen><userinput remap="install">mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
+
     <para>Create the Sysvinit compatibility symlinks, so Systemd is used
     as the default init system:</para>
 
 <screen><userinput remap="install">for tool in runlevel reboot shutdown poweroff halt telinit; do
-     ln -sfv ../bin/systemctl /sbin/$tool
+     ln -sfv ../bin/systemctl /sbin/${tool}
 done
 ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
 
@@ -110,7 +123,7 @@
     <para>Create the <filename>/etc/machine-id</filename> file needed by
     Journald:</para>
 
-<screen><userinput>systemd-machine-id-setup</userinput></screen>
+<screen><userinput remap="install">systemd-machine-id-setup</userinput></screen>
 
   </sect2>
 
@@ -123,22 +136,22 @@
       <segtitle>Installed directories</segtitle>
 
       <seglistitem>
-        <seg>halt, hostnamectl, init, journalctl, kernel-install, localectl,
-        loginctl, poweroff, reboot, runlevel, shutdown, systemctl,
-        systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls,
-        systemd-cgtop, systemd-coredumpctl, systemd-delta, systemd-detect-virt,
-        systemd-inhibit, systemd-machine-id-setup, systemd-notify,
-        systemd-nspawn, systemd-stdio-bridge, systemd-tmpfiles,
-        systemd-tty-ask-password-agent, telinit, timedatectl and
-        udevadm</seg>
+        <seg>bootctl, halt, hostnamectl, init, journalctl, kernel-install, localectl,
+        loginctl, machinectl, poweroff, reboot, runlevel, shutdown, systemctl,
+        systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop,
+        systemd-coredumpctl, systemd-delta, systemd-detect-virt, systemd-inhibit,
+        systemd-machine-id-setup, systemd-notify, systemd-nspawn, systemd-run,
+        systemd-stdio-bridge, systemd-tmpfiles, systemd-tty-ask-password-agent, telinit,
+        timedatectl, and udevadm</seg>
         <seg>libnss_myhostname.so.2, libsystemd-daemon.so, libsystemd-id128.so,
-        libsystemd-journal.so, libsystemd-login.so and libudev.so</seg>
-        <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d, /etc/rpm,
+        libsystemd-journal.so, libsystemd-login.so, and libudev.so</seg>
+        <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
         /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
         /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
-        /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d, /usr/lib/sysctl.d,
-        /usr/lib/systemd, /usr/lib/tmpfiles.d, /usr/share/doc/systemd-&systemd-version;,
-        /usr/share/systemd, /var/lib/systemd and /var/log/journal</seg>
+        /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d, /usr/lib/rpm,
+        /usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d,
+        /usr/share/doc/systemd-&systemd-version;, /usr/share/systemd,
+        /var/lib/systemd and /var/log/journal</seg>
       </seglistitem>
     </segmentedlist>
 
@@ -147,6 +160,16 @@
       <?dbfo list-presentation="list"?>
       <?dbhtml list-presentation="table"?>
 
+<!--      <varlistentry id="bootctl">
+        <term><command>bootctl</command></term>
+        <listitem>
+          <para></para>
+          <indexterm zone="ch-system-systemd bootctl">
+            <primary sortas="b-bootctl">bootctl</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry> -->
+
       <varlistentry id="halt">
         <term><command>halt</command></term>
         <listitem>
@@ -227,6 +250,17 @@
         </listitem>
       </varlistentry>
 
+      <varlistentry id="machinectl">
+        <term><command>machinectl</command></term>
+        <listitem>
+          <para>used to introspect and control the state of the Systemd Virtual
+          Machine and Container Registration Manager</para>
+          <indexterm zone="ch-system-systemd machinectl">
+            <primary sortas="b-machinectl">machinectl</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
       <varlistentry id="poweroff">
         <term><command>poweroff</command></term>
         <listitem>
@@ -412,6 +446,17 @@
           </indexterm>
         </listitem>
       </varlistentry>
+
+      <varlistentry id="systemd-run">
+        <term><command>systemd-run</command></term>
+        <listitem>
+          <para>used to create and start a transient .service or a .scope unit and
+          run the specified command in it.</para>
+          <indexterm zone="ch-system-systemd systemd-run">
+            <primary sortas="b-systemd-run">systemd-run</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
 
 <!--      <varlistentry id="systemd-stdio-bridge">
         <term><command>systemd-stdio-bridge</command></term>

Modified: branches/systemd/BOOK/chapter07/network.xml
==============================================================================
--- branches/systemd/BOOK/chapter07/network.xml	Sat Dec 21 04:01:40 2013	(r10403)
+++ branches/systemd/BOOK/chapter07/network.xml	Sat Dec 21 11:46:16 2013	(r10404)
@@ -22,21 +22,30 @@
 
     <para>Which interfaces are brought up and down by the network script
     depends on the files in <filename
-    class="directory">/etc/sysconfig/</filename>.  This directory should
+    class="directory">/etc/sysconfig/</filename>. This directory should
     contain a file for each interface to be configured, such as
     <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is
-    meaningful to the administrator such as the device name (e.g. eth0).
+    required to be a Network Card Interface name (e.g. eth0).
     Inside this file are attributes to this interface, such as its IP
     address(es), subnet masks, and so forth.  It is necessary that
     the stem of the filename be <emphasis>ifconfig</emphasis>.</para>
 
+    <note><para>Udev may assign random Network Card Interface names
+    for some network cards such as enp2s1. If you are not sure what
+    your Network Card Interface name is, you can always run
+    <command>ip l</command> after you have booted your system. Again,
+    it is important that <filename>ifconfig.xyz</filename> is named
+    after correct Network Card Interface name (e.g.
+    <filename>ifconfig.enp2s1</filename> or
+    <filename>ifconfig.eth0</filename>) or Systemd will fail to bring
+    up your network interface.</para></note>
+
     <para>The following command creates a sample file for the
     <emphasis>eth0</emphasis> device with a static IP address:</para>
 
 <screen><userinput>cd /etc/sysconfig/
 cat > ifconfig.eth0 << "EOF"
-<literal>ONBOOT=yes
-IFACE=eth0
+<literal>IFACE=eth0
 SERVICE=ipv4-static
 IP=192.168.1.1
 GATEWAY=192.168.1.2
@@ -47,20 +56,13 @@
     <para>The values of these variables must be changed in every file to match
     the proper setup.</para>
 
-    <para>If the <envar>ONBOOT</envar> variable is set to <quote>yes</quote> the
-    network script will bring up the Network Interface Card (NIC) during
-    booting of the system. If set to anything but <quote>yes</quote> the NIC
-    will be ignored by the network script and not be automatically brought up.
-    The interface can be manually started or stopped with the
-    <command>ifup</command> and <command>ifdown</command> commands.</para>
-
     <para>The <envar>IFACE</envar> variable defines the interface name,
-    for example, eth0.  It is required for all network device configuration
-    files. </para>
+    for example, eth0. It is required for all network device configuration
+    files.</para>
 
     <para>The <envar>SERVICE</envar> variable defines the method used for
-    obtaining the IP address. The LFS-Bootscripts package has a modular IP
-    assignment format, and creating additional files in the <filename
+    obtaining the IP address. The LFS-Network-Scripts package has a modular
+    IP assignment format, and creating additional files in the <filename
     class="directory">/lib/services/</filename> directory allows other IP
     assignment methods. This is commonly used for Dynamic Host Configuration
     Protocol (DHCP), which is addressed in the BLFS book.</para>
@@ -83,6 +85,30 @@
 
   </sect2>
 
+  <sect2>
+    <title>Configuring the Network Interface Card at boot</title>
+
+    <para>Enabling of the Network Interface Card configuration is
+    done per interface. To enable Network Interface Card
+    configuration at boot, run:</para>
+
+<screen><userinput>systemctl enable ifupdown at eth0</userinput></screen>
+
+    <para>To disable previously enabled Network Interface
+    Card configuration at boot, run:</para>
+
+<screen><userinput>systemctl disable ifupdown at eth0</userinput></screen>
+
+    <para>To manually start the Network Interface Card configuration,
+    run:</para>
+
+<screen><userinput>systemctl start ifupdown at eth0</userinput></screen>
+
+    <para>Replace eth0 with the correct Network Interface Card
+    name as described on the beginning of this page.</para>
+
+  </sect2>
+
   <sect2 id="resolv.conf">
     <title>Creating the /etc/resolv.conf File</title>
 

Modified: branches/systemd/BOOK/general.ent
==============================================================================
--- branches/systemd/BOOK/general.ent	Sat Dec 21 04:01:40 2013	(r10403)
+++ branches/systemd/BOOK/general.ent	Sat Dec 21 11:46:16 2013	(r10404)
@@ -1,4 +1,4 @@
-<!ENTITY version         "SYTEMD-20131221">
+<!ENTITY version         "SYSTEMD-20131221">
 <!ENTITY releasedate     "December 21, 2013">
 <!ENTITY copyrightdate   "1999-2013"><!-- jhalfs needs a literal dash, not – -->
 <!ENTITY milestone       "7.5">

Modified: branches/systemd/BOOK/network-scripts/lfs/units/ifupdownat.service
==============================================================================
--- branches/systemd/BOOK/network-scripts/lfs/units/ifupdownat.service	Sat Dec 21 04:01:40 2013	(r10403)
+++ branches/systemd/BOOK/network-scripts/lfs/units/ifupdownat.service	Sat Dec 21 11:46:16 2013	(r10404)
@@ -1,11 +1,12 @@
 [Unit]
-Description=Start ifupdown for %i
-Requires=sys-subsystem-net-devices-%i.device
+Description=Start ifupdown for %I
 After=sys-subsystem-net-devices-%i.device
+BindTo=sys-subsystem-net-devices-%i.device
+ConditionPathExists=/etc/sysconfig/ifconfig.%i
 
 [Service]
-ExecStart=/sbin/ifup %i
-ExecStop=/sbin/ifdown %i
+ExecStart=/sbin/ifup %I
+ExecStop=/sbin/ifdown %I
 RemainAfterExit=true
 
 [Install]



More information about the lfs-book mailing list