aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootscripts/ChangeLog4
-rw-r--r--bootscripts/lfs/init.d/mountfs9
-rw-r--r--bootscripts/lfs/init.d/network3
-rw-r--r--chapter01/changelog.xml14
-rw-r--r--chapter07/network.xml103
-rw-r--r--general.ent6
-rw-r--r--packages.ent2
7 files changed, 53 insertions, 88 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog
index 926f1485e..5a809d1b8 100644
--- a/bootscripts/ChangeLog
+++ b/bootscripts/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-24 Bruce Dubbs <bdubbs@linuxfromscratch.org>
+ * Unmount network file systems before bringing down the network
+ * Spell out some mount/umount options
+
2017-03-25 DJ Lucas <dj@linuxfromscratch.org>
* Bash-4.4 changes no longer allow continue in function to pass to calling
loop.
diff --git a/bootscripts/lfs/init.d/mountfs b/bootscripts/lfs/init.d/mountfs
index 4605d6096..3e3139bed 100644
--- a/bootscripts/lfs/init.d/mountfs
+++ b/bootscripts/lfs/init.d/mountfs
@@ -33,7 +33,7 @@
case "${1}" in
start)
log_info_msg "Remounting root file system in read-write mode..."
- mount -o remount,rw / >/dev/null
+ mount --options remount,rw / >/dev/null
evaluate_retval
# Remove fsck-related file system watermarks.
@@ -46,7 +46,7 @@ case "${1}" in
# their option list. _netdev denotes a network filesystem.
log_info_msg "Mounting remaining file systems..."
- mount -a -O no_netdev >/dev/null
+ mount --all --test-opts no_netdev >/dev/null
evaluate_retval
exit $failed
;;
@@ -54,11 +54,12 @@ case "${1}" in
stop)
# Don't unmount virtual file systems like /run
log_info_msg "Unmounting all other currently mounted file systems..."
- umount -a -d -r -t notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts >/dev/null
+ umount --all --detach-loop --read-only \
+ --types notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts >/dev/null
evaluate_retval
# Make sure / is mounted read only (umount bug)
- mount -o remount,ro /
+ mount --test-opts remount,ro /
# Make all LVM volume groups unavailable, if appropriate
# This fails if swap or / are on an LVM partition
diff --git a/bootscripts/lfs/init.d/network b/bootscripts/lfs/init.d/network
index c34123555..7cf0c7017 100644
--- a/bootscripts/lfs/init.d/network
+++ b/bootscripts/lfs/init.d/network
@@ -45,6 +45,9 @@ case "${1}" in
;;
stop)
+ # Unmount any network mounted file systems
+ umount --all --force --types nfs,cifs,nfs4
+
# Reverse list
net_files=""
for file in /etc/sysconfig/ifconfig.*
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index f0acf97cf..ebff618c7 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -42,6 +42,20 @@
<listitem revision="sysv"> or <listitem revision="systemd"> as
appropriate for the entry or if needed the entire day's listitem.
-->
+ <listitem revision='sysv'>
+ <para>2017-06-24</para>
+ <itemizedlist>
+ <listitem>
+ <para>[bdubbs] - Remove section disussing configuration
+ without a network card.</para>
+ </listitem>
+ <listitem>
+ <para>[bdubbs] - Update boot scripts to unmount network
+ file systems before bringing down the network.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
<listitem>
<para>2017-06-21</para>
<itemizedlist>
diff --git a/chapter07/network.xml b/chapter07/network.xml
index 942276478..b5202fb62 100644
--- a/chapter07/network.xml
+++ b/chapter07/network.xml
@@ -13,7 +13,7 @@
<indexterm zone="ch-scripts-network">
<primary sortas="d-network">network</primary>
<secondary>configuring</secondary></indexterm>
-
+<!--
<para>This section only applies if a network card is to be
configured.</para>
@@ -23,7 +23,7 @@
from all run-level directories (<filename
class="directory">/etc/rc.d/rc*.d</filename>) after the bootscripts are
installed in <xref linkend="ch-scripts-bootscripts"/>.</para>
-
+-->
<sect2>
<title>Creating Network Interface Configuration Files</title>
@@ -31,20 +31,18 @@
usually depends on the files in <filename
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 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>
+ <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> should describe
+ the network card. The interface name (e.g. eth0) is usually appropriate.
+ 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>If the procedure in the previous section was not used, Udev
will assign network card interface names based on system physical
characteristics such as enp2s1. If you are not sure what your interface
- name is, you can always run <command>ip link</command> after you have
- booted your system. Again, it is important that ifconfig.xyz is named
- after correct network card interface name (e.g. ifconfig.enp2s1 or
- ifconfig.eth0) or your network interface will not be initialized during
- the boot process.</para></note>
+ name is, you can always run <command>ip link</command> or <command>ls
+ /sys/class/net</command> after you have booted your system.
+ </para></note>
<para>The following command creates a sample file for the
<emphasis>eth0</emphasis> device with a static IP address:</para>
@@ -98,64 +96,6 @@ EOF</userinput></screen>
<para>For more information see the <command>ifup</command> man page.</para>
</sect2>
-<!--
- <sect2 id="systemd-net-enable">
- <title>Configuring the Network Interface Card at boot (systemd)</title>
-
- <para>Enabling of the network interface card configuration
- in systemd 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 a previously enabled network interface
- card configuration at boot, run:</para>
-
-<screen role="nodump"><userinput>systemctl disable ifupdown@eth0</userinput></screen>
-
- <para>To manually start the network interface card configuration,
- run:</para>
-
-<screen role="nodump"><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>
-
- <note><para>These procedures require the configuration files as specified
- in the previous section.</para></note>
-
- <note><para>The network card can also be started or stopped
- with the traditional <command>ifup &lt;device&gt;</command> or
- <command>ifdown &lt;device&gt;</command> commands.</para></note>
-
- </sect2>
-
- <sect2 id="systemd2-net-enable">
- <title>Configuring the Network Interface Card for systemd-networkd</title>
-
- <para>An alternative way to configure a NIC when booting with with
- systemd is to create a configuration file recognized by the
- systemd-networkd daemon. To configure the device create a file similar
- to this:</para>
-
-<screen role="nodump"><userinput>cat &gt; /etc/systemd/network/10-static-eth0.network &lt;&lt; "EOF"
-[Match]
-Name=eth0
-
-[Network]
-Address=192.168.0.2/24
-Gateway=192.168.0.1
-EOF</userinput></screen>
-
- <para>You can use multiple .network files if desired. You can also specify
- DHCP=yes instead of the Address and Gateway settings. See the man page for
- systemd.network for more details,</para>
-
- <note><para>If this method is used, be sure to disable ifupdown@eth0 as
- described in the previous section (if it was enabled).</para></note>
-
- </sect2>
--->
<sect2 id="resolv.conf">
<title>Creating the /etc/resolv.conf File</title>
@@ -163,11 +103,10 @@ EOF</userinput></screen>
<primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary>
</indexterm>
- <para>If the system is going to be connected to the Internet, it will
- need some means of Domain Name Service (DNS) name resolution to
- resolve Internet domain names to IP addresses, and vice versa. This is
- best achieved by placing the IP address of the DNS server, available
- from the ISP or network administrator, into
+ <para>The system will need some means of obtaining Domain Name Service
+ (DNS) name resolution to resolve Internet domain names to IP addresses, and
+ vice versa. This is best achieved by placing the IP address of the DNS
+ server, available from the ISP or network administrator, into
<filename>/etc/resolv.conf</filename>. Create the file by running the
following:</para>
@@ -192,7 +131,9 @@ EOF</userinput></screen>
second <emphasis>nameserver</emphasis> line from the file. The IP address
may also be a router on the local network.</para>
- <note><para>The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4.</para></note>
+ <note>
+ <para>The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4.</para>
+ </note>
</sect2>
@@ -264,7 +205,7 @@ EOF</userinput></screen>
<para>Create the <filename>/etc/hosts</filename> file by running:</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
127.0.1.1 <replaceable>&lt;FQDN&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable>
@@ -273,7 +214,7 @@ EOF</userinput></screen>
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
-# End /etc/hosts (network card version)</literal>
+# End /etc/hosts</literal>
EOF</userinput></screen>
<para>The <replaceable>&lt;192.168.1.1&gt;</replaceable>,
@@ -282,7 +223,9 @@ EOF</userinput></screen>
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>
-
+
+<!-- This is not very useful
+
<para>If a network card is not going to be configured, create the
<filename>/etc/hosts</filename> file by running:</para>
@@ -296,7 +239,7 @@ ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# End /etc/hosts (no network card version)</literal>
-EOF</userinput></screen>
+EOF</userinput></screen> -->
</sect2>
diff --git a/general.ent b/general.ent
index 3fe3ebe6e..9532208c2 100644
--- a/general.ent
+++ b/general.ent
@@ -1,13 +1,13 @@
-<!ENTITY version "SVN-20170621">
+<!ENTITY version "SVN-20170624">
<!ENTITY short-version "svn"> <!-- Used below in &blfs-book;
Change to x.y for release but not -rc releases -->
<!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" -->
-<!ENTITY versiond "20170602-systemd">
+<!ENTITY versiond "20170621-systemd">
<!ENTITY short-versiond "systemd">
<!ENTITY generic-versiond "systemd">
-<!ENTITY releasedate "June 21, 2017">
+<!ENTITY releasedate "June 24, 2017">
<!ENTITY copyrightdate "1999-2017"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "8.1">
diff --git a/packages.ent b/packages.ent
index eb3915182..0d852c85e 100644
--- a/packages.ent
+++ b/packages.ent
@@ -366,7 +366,7 @@
<!ENTITY less-ch6-du "3.5 MB">
<!ENTITY less-ch6-sbu "less than 0.1 SBU">
-<!ENTITY lfs-bootscripts-version "20170325"> <!-- Scripts depend on this format -->
+<!ENTITY lfs-bootscripts-version "20170624"> <!-- Scripts depend on this format -->
<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
<!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM">