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 + * Unmount network file systems before bringing down the network + * Spell out some mount/umount options + 2017-03-25 DJ Lucas * 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 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2017-06-24 + + + [bdubbs] - Remove section disussing configuration + without a network card. + + + [bdubbs] - Update boot scripts to unmount network + file systems before bringing down the network. + + + + 2017-06-21 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 @@ network configuring - + Creating Network Interface Configuration Files @@ -31,20 +31,18 @@ usually depends on the files in /etc/sysconfig/. This directory should contain a file for each interface to be configured, such as - ifconfig.xyz, where xyz 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 - ifconfig. + ifconfig.xyz, where xyz 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 ifconfig. 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 ip link 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. + name is, you can always run ip link or ls + /sys/class/net after you have booted your system. + The following command creates a sample file for the eth0 device with a static IP address: @@ -98,64 +96,6 @@ EOF For more information see the ifup man page. - Creating the /etc/resolv.conf File @@ -163,11 +103,10 @@ EOF /etc/resolv.conf - 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 + 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 /etc/resolv.conf. Create the file by running the following: @@ -192,7 +131,9 @@ EOF second nameserver line from the file. The IP address may also be a router on the local network. - The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4. + + The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4. + @@ -264,7 +205,7 @@ EOF Create the /etc/hosts file by running: cat > /etc/hosts << "EOF" -# Begin /etc/hosts (network card version) +# Begin /etc/hosts 127.0.0.1 localhost 127.0.1.1 <FQDN> <HOSTNAME> @@ -273,7 +214,7 @@ EOF ff02::1 ip6-allnodes ff02::2 ip6-allrouters -# End /etc/hosts (network card version) +# End /etc/hosts EOF The <192.168.1.1>, @@ -282,7 +223,9 @@ EOF 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. - + + diff --git a/general.ent b/general.ent index 3fe3ebe6e..9532208c2 100644 --- a/general.ent +++ b/general.ent @@ -1,13 +1,13 @@ - + - + - + diff --git a/packages.ent b/packages.ent index eb3915182..0d852c85e 100644 --- a/packages.ent +++ b/packages.ent @@ -366,7 +366,7 @@ - +