#!/bin/sh
#
# $NetBSD: fsck,v 1.11 2010/02/17 23:32:07 christos Exp $
#

# PROVIDE: fsck
# REQUIRE: localswap

$_rc_subr_loaded . /etc/rc.subr

name="fsck"
start_cmd="fsck_start"
stop_cmd=":"

fsck_start()
{
	if [ -e /fastboot ]; then
		echo "Fast boot: skipping disk checks."
		return
	fi
	trap : 2 		# Ignore SIGINT, SIGQUIT, so we
	trap : 3		# enter single-user mode on failure.

	echo "Starting file system checks:"
	fsck -x / $fsck_flags
	handle_fsck_error "$?"
}

load_rc_config $name
run_rc_command "$1"
