diff options
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 |