Fix checkroot and give info about mtab

This commit is contained in:
Roy Marples 2007-10-11 15:04:07 +00:00
parent d2813aff86
commit 5261b5ed3a

View File

@ -8,9 +8,10 @@ and optionally repair them."
do_mtab() { do_mtab() {
# Don't create mtab if /etc is readonly # Don't create mtab if /etc is readonly
if ! printf "" 2>/dev/null >/etc/mtab ; then if ! printf "" 2>/dev/null >/etc/mtab ; then
ewarn "Skipping /etc/mtab initialization" "(ro root?)" ewarn "Skipping /etc/mtab initialization (ro root?)"
return 0 return 0
fi fi
ebegin "Updating /etc/mtab"
# Add the entry for / to mtab # Add the entry for / to mtab
mount -f / mount -f /
@ -28,6 +29,7 @@ do_mtab() {
# Remove stale backups # Remove stale backups
rm -f /etc/mtab~ /etc/mtab~~ rm -f /etc/mtab~ /etc/mtab~~
eend 0
} }
root_rw() { root_rw() {
@ -125,8 +127,7 @@ start() {
else else
mount -u -o rw / mount -u -o rw /
fi fi
eend $? "Root filesystem could not be mounted read/write :(" eend $? "Root filesystem could not be mounted read/write" || return $?
return $?
fi fi
# Only Linux has mtab # Only Linux has mtab