diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2013-05-15 17:01:37 +0000 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2013-05-15 17:01:37 +0000 |
commit | 28c4c1ede4b77d1807aacd03cb1133cd502c30de (patch) | |
tree | 2350911bb084d7a25ba803ecdcca7155d3456776 /bootscripts | |
parent | 85e7f3ce1d59872b3ea26b3f4332b934fc1af2af (diff) |
Remove unneeded options and commands from mountfs and
mountvirtfs when mtab is a symlink to /proc/self/mounts
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10275 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts')
-rw-r--r-- | bootscripts/ChangeLog | 4 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/mountfs | 21 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/mountvirtfs | 8 |
3 files changed, 13 insertions, 20 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 3d7b4a5d2..c6569f092 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,7 @@ +2013-05-15 Bruce Dubbs <bdubbs@linuxfromscratch.org> + * Remove unneeded options and commands from mountfs and + mountvirtfs when mtab is a symlink to /proc/self/mounts + 2013-05-11 Bruce Dubbs <bdubbs@linuxfromscratch.org> * Make sure the root fs is mounted read only in mountfs before halting diff --git a/bootscripts/lfs/init.d/mountfs b/bootscripts/lfs/init.d/mountfs index b700d8e7d..6784a6943 100644 --- a/bootscripts/lfs/init.d/mountfs +++ b/bootscripts/lfs/init.d/mountfs @@ -33,23 +33,12 @@ case "${1}" in start) log_info_msg "Remounting root file system in read-write mode..." - mount -n -o remount,rw / >/dev/null + mount -o remount,rw / >/dev/null evaluate_retval # Remove fsck-related file system watermarks. rm -f /fastboot /forcefsck - log_info_msg "Recording existing mounts in /etc/mtab..." - > /etc/mtab - - mount -f / || failed=1 - mount -f /proc || failed=1 - mount -f /sys || failed=1 - mount -f /run || failed=1 - mount -f /dev || failed=1 - (exit ${failed}) - evaluate_retval - # This will mount all filesystems that do not have _netdev in # their option list. _netdev denotes a network filesystem. @@ -60,13 +49,13 @@ case "${1}" in ;; stop) - # Don't unmount tmpfs like /run + # 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 >/dev/null + umount -a -d -r -t notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts >/dev/null evaluate_retval - # Make sure / is mounted read only (umount bug?) - mount -n -o remount,ro / + # Make sure / is mounted read only (umount bug) + mount -o 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/mountvirtfs b/bootscripts/lfs/init.d/mountvirtfs index 1c35fcd43..9c0d0f24d 100644 --- a/bootscripts/lfs/init.d/mountvirtfs +++ b/bootscripts/lfs/init.d/mountvirtfs @@ -33,7 +33,7 @@ case "${1}" in start) # Make sure /run/var is available before logging any messages if ! mountpoint /run >/dev/null; then - mount -n /run || failed=1 + mount /run || failed=1 fi mkdir -p /run/var /run/lock /run/shm @@ -43,17 +43,17 @@ case "${1}" in if ! mountpoint /proc >/dev/null; then log_info_msg2 " ${INFO}/proc" - mount -n -o nosuid,noexec,nodev /proc || failed=1 + mount -o nosuid,noexec,nodev /proc || failed=1 fi if ! mountpoint /sys >/dev/null; then log_info_msg2 " ${INFO}/sys" - mount -n -o nosuid,noexec,nodev /sys || failed=1 + mount -o nosuid,noexec,nodev /sys || failed=1 fi if ! mountpoint /dev >/dev/null; then log_info_msg2 " ${INFO}/dev" - mount -n -o mode=0755,nosuid /dev || failed=1 + mount -o mode=0755,nosuid /dev || failed=1 fi # Copy devices that Udev >= 155 doesn't handle to /dev |