#
# checkfs.sh	Check all filesystems.
#
# Version:	@(#)checkfs  1.10  22-Jun-1998  miquels@cistron.nl
# Modified for the Hurd by Marcus Brinkmann.

# -A and -R not supported yet.

exit 0

. /etc/default/rcS

#
# Check the rest of the file systems.
#
if [ ! -f /fastboot ]
then
    if [ -f /forcefsck ]
    then
        force="-f"
    else
        force=""
    fi
    if [ "$FSCKFIX"  = yes ]
    then
	fix="-y"
    else
	fix="--preen"
    fi
    echo "Checking all file systems..."
    fsck -R -A $fix $force
    case $? in
    # Successful completion
    0)
            ;;
    # Filesystem modified (but ok now)
    1 | 2)
            ;;
    # Fsck couldn't fix it.
    4 | 8)
            echo "Automatic boot failed... help!"
            exit 1
            ;;
    # Signal that really interrupted something
    20 | 130 | 131)
            echo "Boot interrupted"
            exit 1
            ;;
    # Special `let fsck finish' interruption (SIGQUIT)
    12)
            echo "Boot interrupted (filesystem checks complete)"
            exit 1
            ;;
    # Oh dear.
    *)
            echo "Unknown error during fsck"
            exit 1
            ;;
    esac
fi
rm -f /fastboot /forcefsck
