From 94f4fb86521f57d6fabe8caecccd9d0ce316a6c1 Mon Sep 17 00:00:00 2001 From: Krejzi Date: Sat, 21 Dec 2013 19:46:16 +0000 Subject: [PATCH] Misc updates. git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10404 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 8 ++ chapter06/attr.xml | 5 ++ chapter06/bc.xml | 4 +- chapter06/dbus.xml | 2 +- chapter06/gperf.xml | 3 +- chapter06/systemd.xml | 77 ++++++++++++++++---- chapter07/network.xml | 56 ++++++++++---- general.ent | 2 +- network-scripts/lfs/units/ifupdownat.service | 9 ++- 9 files changed, 127 insertions(+), 39 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index d685f6389..ffb04d89c 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -38,6 +38,14 @@ 2013-12-21 + + [krejzi] - Update Systemd instructions and contents + for latest version of Systemd. + + + [krejzi] - Update network configuration page to + use LFS Systemd specific network configuration. + [krejzi] - Merge LFS SVN-20131216 book. diff --git a/chapter06/attr.xml b/chapter06/attr.xml index 557673997..27a3311ee 100644 --- a/chapter06/attr.xml +++ b/chapter06/attr.xml @@ -46,6 +46,11 @@ sed -i -e 's|/@pkg_name@|&-@pkg_version@|' include/builddefs.in + Prevent installation of manual pages that were already installed by + Man-Pages package: + +sed -i -e "/SUBDIRS/s|man2||" man/Makefile + Prepare Attr for compilation: ./configure --prefix=/usr diff --git a/chapter06/bc.xml b/chapter06/bc.xml index 8e37d0132..92f7cbe73 100644 --- a/chapter06/bc.xml +++ b/chapter06/bc.xml @@ -43,7 +43,9 @@ Prepare Bc for compilation: -./configure --prefix=/usr --with-readline +./configure --prefix=/usr \ + --with-readline \ + --mandir=/usr/share/man The meaning of the configure options: diff --git a/chapter06/dbus.xml b/chapter06/dbus.xml index 9939ac269..565c547df 100644 --- a/chapter06/dbus.xml +++ b/chapter06/dbus.xml @@ -93,7 +93,7 @@ Create a symlink, so that D-Bus and Systemd can use the same machine-id file: -ln -s /etc/machine-id /var/lib/dbus +ln -sv /etc/machine-id /var/lib/dbus diff --git a/chapter06/gperf.xml b/chapter06/gperf.xml index 92dd637c7..341d74d8d 100644 --- a/chapter06/gperf.xml +++ b/chapter06/gperf.xml @@ -42,7 +42,8 @@ Prepare Gperf for compilation: -./configure --prefix=/usr --docdir=/usr/share/doc/gperf-&gperf-version; +./configure --prefix=/usr \ + --docdir=/usr/share/doc/gperf-&gperf-version; Compile the package: diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml index f7fd6f7ff..5c62d9b77 100644 --- a/chapter06/systemd.xml +++ b/chapter06/systemd.xml @@ -57,7 +57,7 @@ The meaning of the configure options: - --with-root* + --with-root-* These switches ensure that core programs and shared libraries are installed in the subdirectories @@ -95,11 +95,24 @@ make install + Install manual pages which are shipped in the tarball, but were + not installed by install process: + +for cat in 1 3 5 7 8 +do + install -v -m644 man/*.${cat} /usr/share/man/man${cat} +done + + Move NSS myhostname library to /lib: + +mv -v /usr/lib/libnss_myhostname.so.2 /lib + Create the Sysvinit compatibility symlinks, so Systemd is used as the default init system: 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 @@ -110,7 +123,7 @@ ln -sfv ../lib/systemd/systemd /sbin/init Create the /etc/machine-id file needed by Journald: -systemd-machine-id-setup +systemd-machine-id-setup @@ -123,22 +136,22 @@ ln -sfv ../lib/systemd/systemd /sbin/init Installed directories - 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 + 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 libnss_myhostname.so.2, libsystemd-daemon.so, libsystemd-id128.so, - libsystemd-journal.so, libsystemd-login.so and libudev.so - /etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d, /etc/rpm, + libsystemd-journal.so, libsystemd-login.so, and libudev.so + /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 + /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 @@ -147,6 +160,16 @@ ln -sfv ../lib/systemd/systemd /sbin/init + + halt @@ -227,6 +250,17 @@ ln -sfv ../lib/systemd/systemd /sbin/init + + machinectl + + used to introspect and control the state of the Systemd Virtual + Machine and Container Registration Manager + + machinectl + + + + poweroff @@ -413,6 +447,17 @@ ln -sfv ../lib/systemd/systemd /sbin/init + + systemd-run + + used to create and start a transient .service or a .scope unit and + run the specified command in it. + + systemd-run + + + + diff --git a/network-scripts/lfs/units/ifupdownat.service b/network-scripts/lfs/units/ifupdownat.service index 3c5dc494b..c5ea9e7f2 100644 --- a/network-scripts/lfs/units/ifupdownat.service +++ b/network-scripts/lfs/units/ifupdownat.service @@ -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]