Misc updates.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10404 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Krejzi 2013-12-21 19:46:16 +00:00
parent c158fe6ad6
commit 94f4fb8652
9 changed files with 127 additions and 39 deletions

View File

@ -38,6 +38,14 @@
<listitem> <listitem>
<para>2013-12-21</para> <para>2013-12-21</para>
<itemizedlist> <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> <listitem>
<para>[krejzi] - Merge LFS SVN-20131216 book.</para> <para>[krejzi] - Merge LFS SVN-20131216 book.</para>
</listitem> </listitem>

View File

@ -46,6 +46,11 @@
<screen><userinput remap="pre">sed -i -e 's|/@pkg_name@|&amp;-@pkg_version@|' include/builddefs.in</userinput></screen> <screen><userinput remap="pre">sed -i -e 's|/@pkg_name@|&amp;-@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> <para>Prepare Attr for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>

View File

@ -43,7 +43,9 @@
<para>Prepare Bc for compilation:</para> <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> <variablelist>
<title>The meaning of the configure options:</title> <title>The meaning of the configure options:</title>

View File

@ -93,7 +93,7 @@
<para>Create a symlink, so that D-Bus and Systemd can use the same <para>Create a symlink, so that D-Bus and Systemd can use the same
<filename>machine-id</filename> file:</para> <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> </sect2>

View File

@ -42,7 +42,8 @@
<para>Prepare Gperf for compilation:</para> <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> <para>Compile the package:</para>

View File

@ -57,7 +57,7 @@
<title>The meaning of the configure options:</title> <title>The meaning of the configure options:</title>
<varlistentry> <varlistentry>
<term><parameter>--with-root*</parameter></term> <term><parameter>--with-root-*</parameter></term>
<listitem> <listitem>
<para>These switches ensure that core programs and <para>These switches ensure that core programs and
shared libraries are installed in the subdirectories shared libraries are installed in the subdirectories
@ -95,11 +95,24 @@
<screen><userinput remap="install">make install</userinput></screen> <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 <para>Create the Sysvinit compatibility symlinks, so Systemd is used
as the default init system:</para> as the default init system:</para>
<screen><userinput remap="install">for tool in runlevel reboot shutdown poweroff halt telinit; do <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 done
ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen> ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
@ -110,7 +123,7 @@ ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
<para>Create the <filename>/etc/machine-id</filename> file needed by <para>Create the <filename>/etc/machine-id</filename> file needed by
Journald:</para> Journald:</para>
<screen><userinput>systemd-machine-id-setup</userinput></screen> <screen><userinput remap="install">systemd-machine-id-setup</userinput></screen>
</sect2> </sect2>
@ -123,22 +136,22 @@ ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
<segtitle>Installed directories</segtitle> <segtitle>Installed directories</segtitle>
<seglistitem> <seglistitem>
<seg>halt, hostnamectl, init, journalctl, kernel-install, localectl, <seg>bootctl, halt, hostnamectl, init, journalctl, kernel-install, localectl,
loginctl, poweroff, reboot, runlevel, shutdown, systemctl, loginctl, machinectl, poweroff, reboot, runlevel, shutdown, systemctl,
systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls, systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop,
systemd-cgtop, systemd-coredumpctl, systemd-delta, systemd-detect-virt, systemd-coredumpctl, systemd-delta, systemd-detect-virt, systemd-inhibit,
systemd-inhibit, systemd-machine-id-setup, systemd-notify, systemd-machine-id-setup, systemd-notify, systemd-nspawn, systemd-run,
systemd-nspawn, systemd-stdio-bridge, systemd-tmpfiles, systemd-stdio-bridge, systemd-tmpfiles, systemd-tty-ask-password-agent, telinit,
systemd-tty-ask-password-agent, telinit, timedatectl and timedatectl, and udevadm</seg>
udevadm</seg>
<seg>libnss_myhostname.so.2, libsystemd-daemon.so, libsystemd-id128.so, <seg>libnss_myhostname.so.2, libsystemd-daemon.so, libsystemd-id128.so,
libsystemd-journal.so, libsystemd-login.so and libudev.so</seg> 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, <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
/etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev, /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
/etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd, /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/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d, /usr/lib/rpm,
/usr/lib/systemd, /usr/lib/tmpfiles.d, /usr/share/doc/systemd-&systemd-version;, /usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d,
/usr/share/systemd, /var/lib/systemd and /var/log/journal</seg> /usr/share/doc/systemd-&systemd-version;, /usr/share/systemd,
/var/lib/systemd and /var/log/journal</seg>
</seglistitem> </seglistitem>
</segmentedlist> </segmentedlist>
@ -147,6 +160,16 @@ ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
<?dbfo list-presentation="list"?> <?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?> <?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"> <varlistentry id="halt">
<term><command>halt</command></term> <term><command>halt</command></term>
<listitem> <listitem>
@ -227,6 +250,17 @@ ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
</listitem> </listitem>
</varlistentry> </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"> <varlistentry id="poweroff">
<term><command>poweroff</command></term> <term><command>poweroff</command></term>
<listitem> <listitem>
@ -413,6 +447,17 @@ ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
</listitem> </listitem>
</varlistentry> </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"> <!-- <varlistentry id="systemd-stdio-bridge">
<term><command>systemd-stdio-bridge</command></term> <term><command>systemd-stdio-bridge</command></term>
<listitem> <listitem>

View File

@ -22,21 +22,30 @@
<para>Which interfaces are brought up and down by the network script <para>Which interfaces are brought up and down by the network script
depends on the files in <filename 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 contain a file for each interface to be configured, such as
<filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is <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 Inside this file are attributes to this interface, such as its IP
address(es), subnet masks, and so forth. It is necessary that address(es), subnet masks, and so forth. It is necessary that
the stem of the filename be <emphasis>ifconfig</emphasis>.</para> 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 <para>The following command creates a sample file for the
<emphasis>eth0</emphasis> device with a static IP address:</para> <emphasis>eth0</emphasis> device with a static IP address:</para>
<screen><userinput>cd /etc/sysconfig/ <screen><userinput>cd /etc/sysconfig/
cat &gt; ifconfig.eth0 &lt;&lt; "EOF" cat &gt; ifconfig.eth0 &lt;&lt; "EOF"
<literal>ONBOOT=yes <literal>IFACE=eth0
IFACE=eth0
SERVICE=ipv4-static SERVICE=ipv4-static
IP=192.168.1.1 IP=192.168.1.1
GATEWAY=192.168.1.2 GATEWAY=192.168.1.2
@ -47,20 +56,13 @@ EOF</userinput></screen>
<para>The values of these variables must be changed in every file to match <para>The values of these variables must be changed in every file to match
the proper setup.</para> 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, <para>The <envar>IFACE</envar> variable defines the interface name,
for example, eth0. It is required for all network device configuration for example, eth0. It is required for all network device configuration
files. </para> files.</para>
<para>The <envar>SERVICE</envar> variable defines the method used for <para>The <envar>SERVICE</envar> variable defines the method used for
obtaining the IP address. The LFS-Bootscripts package has a modular IP obtaining the IP address. The LFS-Network-Scripts package has a modular
assignment format, and creating additional files in the <filename IP assignment format, and creating additional files in the <filename
class="directory">/lib/services/</filename> directory allows other IP class="directory">/lib/services/</filename> directory allows other IP
assignment methods. This is commonly used for Dynamic Host Configuration assignment methods. This is commonly used for Dynamic Host Configuration
Protocol (DHCP), which is addressed in the BLFS book.</para> Protocol (DHCP), which is addressed in the BLFS book.</para>
@ -83,6 +85,30 @@ EOF</userinput></screen>
</sect2> </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@eth0</userinput></screen>
<para>To disable previously enabled Network Interface
Card configuration at boot, run:</para>
<screen><userinput>systemctl disable ifupdown@eth0</userinput></screen>
<para>To manually start the Network Interface Card configuration,
run:</para>
<screen><userinput>systemctl start ifupdown@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"> <sect2 id="resolv.conf">
<title>Creating the /etc/resolv.conf File</title> <title>Creating the /etc/resolv.conf File</title>

View File

@ -1,4 +1,4 @@
<!ENTITY version "SYTEMD-20131221"> <!ENTITY version "SYSTEMD-20131221">
<!ENTITY releasedate "December 21, 2013"> <!ENTITY releasedate "December 21, 2013">
<!ENTITY copyrightdate "1999-2013"><!-- jhalfs needs a literal dash, not &ndash; --> <!ENTITY copyrightdate "1999-2013"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "7.5"> <!ENTITY milestone "7.5">

View File

@ -1,11 +1,12 @@
[Unit] [Unit]
Description=Start ifupdown for %i Description=Start ifupdown for %I
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device After=sys-subsystem-net-devices-%i.device
BindTo=sys-subsystem-net-devices-%i.device
ConditionPathExists=/etc/sysconfig/ifconfig.%i
[Service] [Service]
ExecStart=/sbin/ifup %i ExecStart=/sbin/ifup %I
ExecStop=/sbin/ifdown %i ExecStop=/sbin/ifdown %I
RemainAfterExit=true RemainAfterExit=true
[Install] [Install]