checkfs: don't check root filesystem if it was already done in initramfs

This commit is contained in:
Silvan Calarco 2011-08-18 16:56:10 +02:00
parent 773585feb7
commit 71fa047717

View File

@ -13,28 +13,29 @@ if [ -f /fastboot ]; then
exit 0 exit 0
fi fi
echo -n "Mounting root file system in read-only mode: " echo -n "Checking file systems: "
mount -n -o remount,ro / $PLYMOUTH message --text=$"Checking file systems..."
retval=$?
if [ $retval != 0 ]; then if [ ! -e /run/initramfs/root-fsck ]; then
$FAILURE echo -n "Mounting root file system in read-only mode: "
echo mount -n -o remount,ro /
echo "Cannot check root file system because it could not" retval=$?
echo "be mounted in read-only mode."
echo if [ $retval != 0 ]; then
echo -n "When you press enter, this system will be halted." $FAILURE
$NORMAL echo "Cannot check root file system because it could not"
echo echo "be mounted in read-only mode."
echo "Press enter to continue..." echo
read ans $NORMAL
echo "gonna run: $rc_base/init.d/halt" $PLYMOUTH message --text=$"Checking file systems...operational error!"
$rc_base/init.d/halt echo_warning
echo
else
echo_success
echo
fi
fi fi
echo_success
echo
if [ -f /forcefsck ]; then if [ -f /forcefsck ]; then
echo "/forcefsck exists, forcing file system check" echo "/forcefsck exists, forcing file system check"
options="-f" options="-f"
@ -42,9 +43,6 @@ else
options="" options=""
fi fi
echo -n "Checking file systems: "
$PLYMOUTH message --text=$"Checking file systems..."
# note: -a option used to be -p; but this fails e.g. on fsck.minix # note: -a option used to be -p; but this fails e.g. on fsck.minix
fsck $options -a -A -C -T fsck $options -a -A -C -T
retval=$? retval=$?