diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2014-04-03 21:52:09 +0000 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2014-04-03 21:52:09 +0000 |
commit | cba2d4e6aa081fdf62e527d28eba137eb885f0cc (patch) | |
tree | eee1c3ef6d42101635b135289262eb1386cf87a0 /chapter06 | |
parent | 008436e04cb47fbba28ab083cf4ef9339699b5fd (diff) |
Added systemd and dbus to the book.
Set up systemd and System V side-by-side with the
ability to reboot to either system.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10520 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r-- | chapter06/chapter06.xml | 10 | ||||
-rw-r--r-- | chapter06/dbus.xml | 186 | ||||
-rw-r--r-- | chapter06/systemd.xml | 606 | ||||
-rw-r--r-- | chapter06/sysvinit-header.xml | 15 | ||||
-rw-r--r-- | chapter06/sysvinit.xml | 36 |
5 files changed, 717 insertions, 136 deletions
diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index 51d5a932f..a7e866f75 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -84,14 +84,14 @@ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit-header.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> - <!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/>--> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/> + + <!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/>--> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/> diff --git a/chapter06/dbus.xml b/chapter06/dbus.xml new file mode 100644 index 000000000..476baf41d --- /dev/null +++ b/chapter06/dbus.xml @@ -0,0 +1,186 @@ +<?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-system-dbus" role="wrap"> + <?dbhtml filename="dbus.html"?> + + <sect1info condition="script"> + <productname>dbus</productname> + <productnumber>&dbus-version;</productnumber> + <address>&dbus-url;</address> + </sect1info> + + <title>D-Bus-&dbus-version;</title> + + <indexterm zone="ch-system-dbus"> + <primary sortas="a-dbus">D-Bus</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>D-Bus is a message bus system, a simple way for applications to talk + to one another. D-Bus supplies both a system daemon (for events such as + "new hardware device added" or "printer queue changed") and a + per-user-login-session daemon (for general IPC needs among user + applications). Also, the message bus is built on top of a general one-to-one + message passing framework, which can be used by any two applications to + communicate directly (without going through the message bus daemon).</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&dbus-ch6-sbu;</seg> + <seg>&dbus-ch6-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of D-Bus</title> + + <para>Prepare D-Bus for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --docdir=/usr/share/doc/dbus-&dbus-version; \ + --with-console-auth-dir=/run/console</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--with-console-auth-dir=/run/console</parameter></term> + <listitem> + <para>This specifies the location of the ConsoleKit auth + directory.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>This package does come with a testsuite, but it requires several + packages that are not included in LFS. Instructions for running the + testsuite can be found in the BLFS book at + <ulink url="&blfs-root;/view/svn/general/dbus.html"/>.</para> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + <para>The shared library needs to be moved to + <filename class="directory">/lib</filename>, and as a result the + <filename class="extension">.so</filename> file in + <filename class="directory">/usr/lib</filename> will need to be recreated:</para> + +<screen><userinput remap="install">mv -v /usr/lib/libdbus-1.so.* /lib +ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen> + + <para>Create a symlink, so that D-Bus and Systemd can use the same + <filename>machine-id</filename> file:</para> + +<screen><userinput remap="install">ln -sv /etc/machine-id /var/lib/dbus</userinput></screen> + + </sect2> + + <sect2 id="contents-dbus" role="content"> + <title>Contents of D-Bus</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed libraries</segtitle> + <segtitle>Installed directories</segtitle> + + <seglistitem> + <seg>dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor, + dbus-send, and dbus-uuidgen</seg> + <seg>libdbus-1.{a,so}</seg> + <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0, + /usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version;, + /var/lib/dbus</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="dbus-cleanup-sockets"> + <term><command>dbus-cleanup-sockets</command></term> + <listitem> + <para>Used to clean up leftover sockets in a directory.</para> + <indexterm zone="ch-system-dbus dbus-cleanup-sockets"> + <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="dbus-daemon"> + <term><command>dbus-daemon</command></term> + <listitem> + <para>The D-Bus message bus daemon.</para> + <indexterm zone="ch-system-dbus dbus-daemon"> + <primary sortas="b-dbus-daemon">dbus-daemon</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="dbus-launch"> + <term><command>dbus-launch</command></term> + <listitem> + <para>Starts <command>dbus-daemon</command> from a shell + script.</para> + <indexterm zone="ch-system-dbus dbus-launch"> + <primary sortas="b-dbus-launch">dbus-launch</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="dbus-monitor"> + <term><command>dbus-monitor</command></term> + <listitem> + <para>Monitors messages passing through a D-Bus message bus.</para> + <indexterm zone="ch-system-dbus dbus-monitor"> + <primary sortas="b-dbus-monitor">dbus-monitor</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="dbus-send"> + <term><command>dbus-send</command></term> + <listitem> + <para>Sends a message to a D-Bus message bus.</para> + <indexterm zone="ch-system-dbus dbus-send"> + <primary sortas="b-dbus-send">dbus-send</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="dbus-uuidgen"> + <term><command>dbus-uuidgen</command></term> + <listitem> + <para>Generates a universally unique ID.</para> + <indexterm zone="ch-system-dbus dbus-uuidgen"> + <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml index 23314e563..8e669f1d2 100644 --- a/chapter06/systemd.xml +++ b/chapter06/systemd.xml @@ -5,28 +5,26 @@ %general-entities; ]> -<sect1 id="ch-system-udev" role="wrap"> - <?dbhtml filename="udev.html"?> +<sect1 id="ch-system-systemd" role="wrap"> + <?dbhtml filename="systemd.html"?> <sect1info condition="script"> - <productname>udev</productname> + <productname>systemd</productname> <productnumber>&systemd-version;</productnumber> <address>&systemd-url;</address> </sect1info> - <title>Udev-&systemd-version; (Extracted from systemd-&systemd-version;)</title> + <title>Systemd-&systemd-version;</title> - <indexterm zone="ch-system-udev"> - <primary sortas="a-Udev">Udev</primary> + <indexterm zone="ch-system-systemd"> + <primary sortas="a-Systemd">Systemd</primary> </indexterm> <sect2 role="package"> <title/> - <para>The Udev package contains programs for dynamic creation of device - nodes. The development of udev has been merged with systemd, but - most of systemd is incompatible with LFS. Here we build and install just - the needed udev files.</para> + <para>The Systemd package contains programs for controlling the startup, + running, and shutdown of the system.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> @@ -40,63 +38,155 @@ </sect2> <sect2 role="installation"> - <title>Installation of Udev</title> + <title>Installation of Systemd</title> - <note><para>This package is a little different from other packages. The - initial package that is extracted is - <filename>systemd-&systemd-version;.tar.xz</filename> even though the - application we are installing is udev. After changing to the - systemd directory, follow the instructions below.</para></note> + <para>First, create a file to allow Systemd to build when using Util-Linux + built in Chapter 5:</para> - <para>The udev-lfs tarball contains LFS-specific files used to build - Udev. Unpack it into the systemd source directory:</para> +<screen><userinput remap="pre">cat > config.cache << "EOF" +<literal>KILL=/bin/kill +HAVE_BLKID=1 +BLKID_LIBS="-lblkid" +BLKID_CFLAGS="-I/tools/include/blkid"</literal> +EOF</userinput></screen> -<screen><userinput remap="pre">tar -xvf ../&udev-lfs;.tar.bz2</userinput></screen> + <para>Aditionally, fix a build error when using Util-Linux built in + Chapter 5:</para> - <para>Create two symbolic links to header files and set an - environment variable to properly use <xref linkend="ch-tools-util-linux"/>.</para> +<screen><userinput remap="pre">sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h")</userinput></screen> -<screen><userinput remap="pre">ln -svf /tools/include/blkid /usr/include -ln -svf /tools/include/uuid /usr/include -export LD_LIBRARY_PATH=/tools/lib</userinput></screen> + <para>Apply a patch so that compat <command>pkg-config</command> files get + installed without installing compat libs which are useless on LFS:</para> - <para>Build the package:</para> +<screen><userinput remap="pre">patch -Np1 -i ../&systemd-compat-patch;</userinput></screen> -<screen><userinput remap="make">make -f &udev-lfs;/Makefile.lfs</userinput></screen> + <para>Prepare Systemd for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --config-cache \ + --with-rootprefix= \ + --with-rootlibdir=/lib \ + --enable-split-usr \ + --disable-gudev \ + --without-python \ + --docdir=/usr/share/doc/systemd-&systemd-version; \ + --with-dbuspolicydir=/etc/dbus-1/system.d \ + --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \ + --with-dbussessionservicedir=/usr/share/dbus-1/services \ + --with-dbussystemservicedir=/usr/share/dbus-1/system-services</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--config-cache</parameter></term> + <listitem> + <para>This switch tells the build system to use + the <filename>config.cache</filename> file which + was created earlier.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--with-root*</parameter></term> + <listitem> + <para>These switches ensure that core programs and + shared libraries are installed in the subdirectories + of the root partition.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--enable-split-usr</parameter></term> + <listitem> + <para>This switch ensures that Systemd will work on + systems where /bin, /lib and /sbin directories are not + symlinks to their /usr counterparts.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-gudev --without-python</parameter></term> + <listitem> + <para>These switches disable optional features because + LFS does not provide their dependencies.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--with-dbus*</parameter></term> + <listitem> + <para>These switches ensure that D-Bus configuratil files + get installed in the correct locations.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make LIBRARY_PATH=/tools/lib</userinput></screen> + + <para>First prevent few broken test cases from running:</para> + +<screen><userinput remap="test">sed -e "s:test/udev-test.pl::g" \ + -e "s:test-bus-cleanup\$(EXEEXT) ::g" \ + -e "s:test-bus-gvariant\$(EXEEXT) ::g" \ + -i Makefile</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make -k check</userinput></screen> + + <para>Note that some tests might fail because the test are being run in a + chroot environment. For full test coverage, the test suite should be run + from a system booted using Systemd.</para> <para>Install the package:</para> -<screen><userinput remap="install">make -f &udev-lfs;/Makefile.lfs install</userinput></screen> +<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</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>Remove an unnecessary directory:</para> + +<screen><userinput remap="install">rm -rfv /usr/lib/rpm</userinput></screen> - <caution><para>There are several places within the - <application>systemd</application> source code that have explicit directory - paths embedded. For instance, the binary version of the hardware - database's path and file name used at run time, - <filename>/etc/udev/hwdb.bin</filename>, cannot be changed without explicit - changes to the source code.</para></caution> + <para>Create the Sysvinit compatibility symlinks, and move some man pages + and a library that conflict with <xref linkend="ch-system-sysvinit"/> so + both systems can be installed side-by-side:</para> - <para>Now initialize the hardware database:</para> +<screen><userinput remap="install">for tool in runlevel reboot shutdown poweroff halt telinit; do + ln -sfv ../bin/systemctl /sbin/${tool}-systemd + mv -v /usr/share/man/man8/${tool}.8 /usr/share/man/man8/${tool}-systemd.8 +done -<screen><userinput remap="install">build/udevadm hwdb --update</userinput></screen> +ln -sfv ../lib/systemd/systemd /sbin/init-systemd +mv -v /etc/init.d /etc/init.d-systemd</userinput></screen> - <para>Finally set up the persistent network udev rules. This task will be - explained in detail in <xref linkend='stable-net-names'/>. Note that the - <filename class='directory'>/sys</filename> and <filename - class='directory'>/proc</filename> filesystems must be mounted in the - chroot environment as explained at the beginning of this chapter for the - following script to work.</para> + <para>Remove a reference to a non-existent group:</para> -<screen><userinput remap="install">bash &udev-lfs;/init-net-rules.sh</userinput></screen> +<screen><userinput remap="install">sed -i "s:0775 root lock:0755 root root:g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen> - <para>Do some cleanup:</para> + <para>Create the <filename>/etc/machine-id</filename> file needed by + Journald:</para> -<screen><userinput remap="install">rm -fv /usr/include/{uuid,blkid} -unset LD_LIBRARY_PATH</userinput></screen> +<screen><userinput remap="install">systemd-machine-id-setup</userinput></screen> + + <para>Finally install some LFS specific udev rules:</para> + +<screen><userinput remap="install">tar -xf ../&udev-lfs-version;.tar.bz2 +make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen> </sect2> - <sect2 id="contents-udev" role="content"> - <title>Contents of Udev</title> + <sect2 id="contents-systemd" role="content"> + <title>Contents of Systemd</title> <segmentedlist> <segtitle>Installed programs</segtitle> @@ -104,12 +194,22 @@ unset LD_LIBRARY_PATH</userinput></screen> <segtitle>Installed directories</segtitle> <seglistitem> - <seg>accelerometer, ata_id, cdrom_id, collect, mtd_probe, - scsi_id, v4l_id, udevadm, and udevd</seg> - - <seg>libudev.so</seg> - - <seg>/etc/udev, /lib/udev, /lib/firmware, /usr/share/doc/udev</seg> + <seg>bootctl, busctl, 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.so, 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, /var/log/journal</seg> </seglistitem> </segmentedlist> @@ -118,48 +218,363 @@ unset LD_LIBRARY_PATH</userinput></screen> <?dbfo list-presentation="list"?> <?dbhtml list-presentation="table"?> - <varlistentry id="ata_id"> - <term><command>ata_id</command></term> + <varlistentry id="bootctl"> + <term><command>bootctl</command></term> + <listitem> + <para>used to query the firmware and boot manager settings.</para> + <indexterm zone="ch-system-systemd bootctl"> + <primary sortas="b-bootctl">bootctl</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="busctl"> + <term><command>busctl</command></term> + <listitem> + <para>used to introspect and monitor the D-Bus bus.</para> + <indexterm zone="ch-system-systemd busctl"> + <primary sortas="b-busctl">busctl</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="halt"> + <term><command>halt</command></term> + <listitem> + <para>Normally invokes <command>shutdown</command> with the + <parameter>-h</parameter> option, except when already in run-level 0, + then it tells the kernel to halt the system; it notes in the + file <filename>/var/log/wtmp</filename> that the system is being + brought down.</para> + <indexterm zone="ch-system-systemd halt"> + <primary sortas="b-halt">halt</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="hostnamectl"> + <term><command>hostnamectl</command></term> + <listitem> + <para>used to query and change the system hostname and related + settings.</para> + <indexterm zone="ch-system-systemd hostnamectl"> + <primary sortas="b-hostnamectl">hostnamectl</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="init"> + <term><command>init</command></term> + <listitem> + <para>The first process to be started when the kernel has initialized + the hardware which takes over the boot process and starts all the + proceses it is instructed to.</para> + <indexterm zone="ch-system-systemd init"> + <primary sortas="b-init">init</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="journalctl"> + <term><command>journalctl</command></term> + <listitem> + <para>used to query the contents of the Systemd Journal.</para> + <indexterm zone="ch-system-systemd journalctl"> + <primary sortas="b-journalctl">journalctl</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="kernel-install"> + <term><command>kernel-install</command></term> + <listitem> + <para>used to add and remove kernel and initramfs images to and + from /boot.</para> + <indexterm zone="ch-system-systemd kernel-install"> + <primary sortas="b-kernel-install">kernel-install</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="localectl"> + <term><command>localectl</command></term> + <listitem> + <para>used to query and change the system locale and keyboard layout + settings.</para> + <indexterm zone="ch-system-systemd localectl"> + <primary sortas="b-localectl">localectl</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="loginctl"> + <term><command>loginctl</command></term> + <listitem> + <para>used to introspect and control the state of the Systemd Login + Manager.</para> + <indexterm zone="ch-system-systemd loginctl"> + <primary sortas="b-loginctl">loginctl</primary> + </indexterm> + </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> + <para>Tells the kernel to halt the system and switch off the computer + (see <command>halt</command>).</para> + <indexterm zone="ch-system-systemd poweroff"> + <primary sortas="b-poweroff">poweroff</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="reboot"> + <term><command>reboot</command></term> <listitem> - <para>Provides Udev with a unique string and - additional information (uuid, label) for an ATA drive</para> - <indexterm zone="ch-system-udev ata_id"> - <primary sortas="b-ata_id">ata_id</primary> + <para>Tells the kernel to reboot the system (see + <command>halt</command>).</para> + <indexterm zone="ch-system-systemd reboot"> + <primary sortas="b-reboot">reboot</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="cdrom_id"> - <term><command>cdrom_id</command></term> + <varlistentry id="runlevel"> + <term><command>runlevel</command></term> <listitem> - <para>Provides Udev with the capabilities of a - CD-ROM or DVD-ROM drive</para> - <indexterm zone="ch-system-udev cdrom_id"> - <primary sortas="b-cdrom_id">cdrom_id</primary> + <para>Reports the previous and the current run-level, as noted in the + last run-level record in <filename>/var/run/utmp</filename>.</para> + <indexterm zone="ch-system-systemd runlevel"> + <primary sortas="b-runlevel">runlevel</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="collect"> - <term><command>collect</command></term> + <varlistentry id="shutdown"> + <term><command>shutdown</command></term> <listitem> - <para>Given an ID for the current uevent and a list of - IDs (for all target uevents), registers the current ID - and indicates whether all target IDs have been registered</para> - <indexterm zone="ch-system-udev collect"> - <primary sortas="b-collect">collect</primary> + <para>Brings the system down in a secure way, signaling all processes + and notifying all logged-in users.</para> + <indexterm zone="ch-system-systemd shutdown"> + <primary sortas="b-shutdown">shutdown</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="scsi_id"> - <term><command>scsi_id</command></term> + <varlistentry id="systemctl"> + <term><command>systemctl</command></term> <listitem> - <para>Provides Udev with a unique SCSI identifier - based on the data returned from sending a SCSI INQUIRY command to - the specified device</para> - <indexterm zone="ch-system-udev scsi_id"> - <primary sortas="b-scsi_id">scsi_id</primary> + <para>used to introspect and control the state of the Systemd system and + service manager.</para> + <indexterm zone="ch-system-systemd systemctl"> + <primary sortas="b-systemctl">systemctl</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-analyze"> + <term><command>systemd-analyze</command></term> + <listitem> + <para>used to determine system boot-up performance of the current boot. + </para> + <indexterm zone="ch-system-systemd systemd-analyze"> + <primary sortas="b-systemd-analyze">systemd-analyze</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-ask-password"> + <term><command>systemd-ask-password</command></term> + <listitem> + <para>used to query a system password or passphrase from the user, using a + question message specified on the command line.</para> + <indexterm zone="ch-system-systemd systemd-ask-password"> + <primary sortas="b-systemd-ask-password">systemd-ask-password</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-cat"> + <term><command>systemd-cat</command></term> + <listitem> + <para>used to connect STDOUT and STDERR of a process with the Journal. + </para> + <indexterm zone="ch-system-systemd systemd-cat"> + <primary sortas="b-systemd-cat">systemd-cat</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-cgls"> + <term><command>systemd-cgls</command></term> + <listitem> + <para>recursively shows the contents of the selected Linux control group + hierarchy in a tree.</para> + <indexterm zone="ch-system-systemd systemd-cgls"> + <primary sortas="b-systemd-cgls">systemd-cgls</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-cgtop"> + <term><command>systemd-cgtop</command></term> + <listitem> + <para>shows the top control groups of the local Linux control group hierarchy, + ordered by their CPU, memory and disk I/O load.</para> + <indexterm zone="ch-system-systemd systemd-cgtop"> + <primary sortas="b-systemd-cgtop">systemd-cgtop</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-coredumpctl"> + <term><command>systemd-coredumpctl</command></term> + <listitem> + <para>used to retrieve coredumps from the Systemd Journal</para> + <indexterm zone="ch-system-systemd systemd-coredumpctl"> + <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-delta"> + <term><command>systemd-delta</command></term> + <listitem> + <para>used to identify and compare configuration files in + <filename class="directory">/etc</filename> that override default + counterparts in <filename class="directory">/usr</filename>.</para> + <indexterm zone="ch-system-systemd systemd-delta"> + <primary sortas="b-systemd-delta">systemd-delta</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-detect-virt"> + <term><command>systemd-detect-virt</command></term> + <listitem> + <para>detects execution in a virtualized environment.</para> + <indexterm zone="ch-system-systemd systemd-detect-virt"> + <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-inhibit"> + <term><command>systemd-inhibit</command></term> + <listitem> + <para>used to execute a program with a shutdown, sleep or idle inhibitor lock + taken.</para> + <indexterm zone="ch-system-systemd systemd-inhibit"> + <primary sortas="b-systemd-inhibit">systemd-inhibit</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-machine-id-setup"> + <term><command>systemd-machine-id-setup</command></term> + <listitem> + <para>used by system installer tools to initialize the machine ID stored in + <filename>/etc/machine-id</filename> at install time with a randomly + generated ID.</para> + <indexterm zone="ch-system-systemd systemd-machine-id-setup"> + <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-notify"> + <term><command>systemd-notify</command></term> + <listitem> + <para>used by daemon scripts to notify the init system about status changes. + </para> + <indexterm zone="ch-system-systemd systemd-notify"> + <primary sortas="b-systemd-notify">systemd-notify</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-nspawn"> + <term><command>systemd-nspawn</command></term> + <listitem> + <para>used to run a command or OS in a light-weight namespace container.</para> + <indexterm zone="ch-system-systemd systemd-nspawn"> + <primary sortas="b-systemd-nspawn">systemd-nspawn</primary> + </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> + <listitem> + <para>To be completed</para> + <indexterm zone="ch-system-systemd systemd-stdio-bridge"> + <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary> + </indexterm> + </listitem> + </varlistentry> --> + + <varlistentry id="systemd-tmpfiles"> + <term><command>systemd-tmpfiles</command></term> + <listitem> + <para>creates, deletes and cleans up volatile and temporary files and directories, + based on the configuration file format and location specified in + <filename class="directory">tmpfiles.d</filename> directories.</para> + <indexterm zone="ch-system-systemd systemd-tmpfiles"> + <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="systemd-tty-ask-password-agent"> + <term><command>systemd-tty-ask-password-agent</command></term> + <listitem> + <para>used to list or process pending Systemd password requests</para> + <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent"> + <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="telinit"> + <term><command>telinit</command></term> + <listitem> + <para>Tells <command>init</command> which run-level to change to.</para> + <indexterm zone="ch-system-systemd telinit"> + <primary sortas="b-telinit">telinit</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="timedatectl"> + <term><command>timedatectl</command></term> + <listitem> + <para>used to query and change the system clock and its settings. + </para> + <indexterm zone="ch-system-systemd timedatectl"> + <primary sortas="b-timedatectl">timedatectl</primary> </indexterm> </listitem> </varlistentry> @@ -167,24 +582,22 @@ unset LD_LIBRARY_PATH</userinput></screen> <varlistentry id="udevadm"> <term><command>udevadm</command></term> <listitem> - <para>Generic udev administration tool: controls the udevd daemon, + <para>Generic Udev administration tool: controls the udevd daemon, provides info from the Udev database, monitors uevents, waits for uevents to finish, tests Udev configuration, and triggers uevents - for a given device</para> - <indexterm zone="ch-system-udev udevadm"> + for a given device.</para> + <indexterm zone="ch-system-systemd udevadm"> <primary sortas="b-udevadm">udevadm</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="udevd"> - <term><command>udevd</command></term> + <varlistentry id="libsystemd"> + <term><filename class="libraryfile">libsystemd</filename></term> <listitem> - <para>A daemon that listens for uevents on the netlink socket, - creates devices and runs the configured external programs in - response to these uevents</para> - <indexterm zone="ch-system-udev udevd"> - <primary sortas="b-udevd">udevd</primary> + <para>Systemd utility library.</para> + <indexterm zone="ch-system-systemd libsystemd"> + <primary sortas="c-libsystemd">libsystemd</primary> </indexterm> </listitem> </varlistentry> @@ -192,24 +605,13 @@ unset LD_LIBRARY_PATH</userinput></screen> <varlistentry id="libudev"> <term><filename class="libraryfile">libudev</filename></term> <listitem> - <para>A library interface to udev device information</para> - <indexterm zone="ch-system-udev libudev"> + <para>A library to access Udev device information.</para> + <indexterm zone="ch-system-systemd libudev"> <primary sortas="c-libudev">libudev</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="etc-udev"> - <term><filename class="directory">/etc/udev</filename></term> - <listitem> - <para>Contains Udev configuration files, - device permissions, and rules for device naming</para> - <indexterm zone="ch-system-udev etc-udev"> - <primary sortas="e-/etc/udev">/etc/udev</primary> - </indexterm> - </listitem> - </varlistentry> - </variablelist> </sect2> diff --git a/chapter06/sysvinit-header.xml b/chapter06/sysvinit-header.xml deleted file mode 100644 index e42fad79e..000000000 --- a/chapter06/sysvinit-header.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?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"> - -<sect1 role="dummy"> - - <sect1info> - <othername>$LastChangedBy$</othername> - <date>$Date$</date> - </sect1info> - - <title>System V</title> - <para/> -</sect1> - diff --git a/chapter06/sysvinit.xml b/chapter06/sysvinit.xml index b1fac46db..c77f77ca1 100644 --- a/chapter06/sysvinit.xml +++ b/chapter06/sysvinit.xml @@ -82,6 +82,14 @@ <screen><userinput remap="install">make -C src install</userinput></screen> + <para>Move files that have a name conflict with <xref linkend="ch-system-systemd"/> + so that both packages can be installed side-by-side:</para> + +<screen><userinput remap="install">for p in init halt poweroff reboot runlevel shutdown telinit; do + mv -v /sbin/$p /sbin/$p-sysv + mv -v /usr/share/man/man8/$p.8 /usr/share/man/man8/$p-sysv.8 +done</userinput></screen> + </sect2> <sect2 id="contents-sysvinit" role="content"> @@ -122,7 +130,7 @@ </listitem> </varlistentry> - <varlistentry id="halt"> + <varlistentry id="halt-sysv"> <term><command>halt</command></term> <listitem> <para>Normally invokes <command>shutdown</command> with the @@ -130,19 +138,19 @@ then it tells the kernel to halt the system; it notes in the file <filename>/var/log/wtmp</filename> that the system is being brought down</para> - <indexterm zone="ch-system-sysvinit halt"> + <indexterm zone="ch-system-sysvinit halt-sysv"> <primary sortas="b-halt">halt</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="init"> + <varlistentry id="init-sysv"> <term><command>init</command></term> <listitem> <para>The first process to be started when the kernel has initialized the hardware which takes over the boot process and starts all the proceses it is instructed to</para> - <indexterm zone="ch-system-sysvinit init"> + <indexterm zone="ch-system-sysvinit init-sysv"> <primary sortas="b-init">init</primary> </indexterm> </listitem> @@ -160,55 +168,55 @@ </listitem> </varlistentry> - <varlistentry id="poweroff"> + <varlistentry id="poweroff-sysv"> <term><command>poweroff</command></term> <listitem> <para>Tells the kernel to halt the system and switch off the computer (see <command>halt</command>)</para> - <indexterm zone="ch-system-sysvinit poweroff"> + <indexterm zone="ch-system-sysvinit poweroff-sysv"> <primary sortas="b-poweroff">poweroff</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="reboot"> + <varlistentry id="reboot-sysv"> <term><command>reboot</command></term> <listitem> <para>Tells the kernel to reboot the system (see <command>halt</command>)</para> - <indexterm zone="ch-system-sysvinit reboot"> + <indexterm zone="ch-system-sysvinit reboot-sysv"> <primary sortas="b-reboot">reboot</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="runlevel"> + <varlistentry id="runlevel-sysv"> <term><command>runlevel</command></term> <listitem> <para>Reports the previous and the current run-level, as noted in the last run-level record in <filename>/var/run/utmp</filename></para> - <indexterm zone="ch-system-sysvinit runlevel"> + <indexterm zone="ch-system-sysvinit runlevel-sysv"> <primary sortas="b-runlevel">runlevel</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="shutdown"> + <varlistentry id="shutdown-sysv"> <term><command>shutdown</command></term> <listitem> <para>Brings the system down in a secure way, signaling all processes and notifying all logged-in users</para> - <indexterm zone="ch-system-sysvinit shutdown"> + <indexterm zone="ch-system-sysvinit shutdown-sysv"> <primary sortas="b-shutdown">shutdown</primary> </indexterm> </listitem> </varlistentry> - <varlistentry id="telinit"> + <varlistentry id="telinit-sysv"> <term><command>telinit</command></term> <listitem> <para>Tells <command>init</command> which run-level to change to</para> - <indexterm zone="ch-system-sysvinit telinit"> + <indexterm zone="ch-system-sysvinit telinit-sysv"> <primary sortas="b-telinit">telinit</primary> </indexterm> </listitem> |