aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2017-06-24 19:33:48 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2017-06-24 19:33:48 +0000
commit94cea1d88644f71a9fd9ca1f1dfd5d78f1537d20 (patch)
tree7616b07753c7cbd7ad370d87894c605ca2a5b619 /bootscripts
parentb2a51129630bd1f0897e18d91d0c4ad925b3bc7b (diff)
Remove section disussing configuration without a network card.
Update boot scripts to unmount network file systems before bringing down the network. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11260 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts')
-rw-r--r--bootscripts/ChangeLog4
-rw-r--r--bootscripts/lfs/init.d/mountfs9
-rw-r--r--bootscripts/lfs/init.d/network3
3 files changed, 12 insertions, 4 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.*