--- checkroot.orig Sat May 11 21:54:42 2002 +++ checkroot Thu Jul 25 11:06:05 2002 @@ -9,21 +9,33 @@ } start() { - ebegin "Remounting root filesystem read-only (if necessary)" - mount / -n -o remount,ro &>/dev/null - eend $? - ebegin "Checking root filesystem" - fsck -a / - if [ "$?" -eq 0 ] + if [ ! -f /fastboot ] then - eend 0 - elif [ "$?" -eq 1 ] - then - ewend 1 "Filesystem repaired" - else - eend 2 "Filesystem couldn't be fixed :(" - /sbin/sulogin ${CONSOLE} - /sbin/reboot -f + ebegin "Remounting root filesystem read-only (if necessary)" + mount / -n -o remount,ro &>/dev/null + eend $? + + ebegin "Checking root filesystem" + if [ -f /forcefsck ] + then + ewarn "A full fsck has been forced" + fsck -C -f -a / + # /forcefsck isn't deleted because checkfs needs it. + # it'll be deleted in that script. + else + fsck -a / + fi + if [ "$?" -eq 0 ] + then + eend 0 + elif [ "$?" -eq 1 ] + then + ewend 1 "Filesystem repaired" + else + eend 2 "Filesystem couldn't be fixed :(" + /sbin/sulogin ${CONSOLE} + /sbin/reboot -f + fi fi ebegin "Remounting root filesystem read/write"