2000-03-10 14:53:23 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2010-02-18 02:32:07 +03:00
|
|
|
# $NetBSD: fsck,v 1.11 2010/02/17 23:32:07 christos Exp $
|
2000-03-10 14:53:23 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: fsck
|
2000-04-26 09:13:51 +04:00
|
|
|
# REQUIRE: localswap
|
2000-03-10 14:53:23 +03:00
|
|
|
|
2004-08-13 22:08:03 +04:00
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
2000-08-22 03:38:07 +04:00
|
|
|
|
|
|
|
name="fsck"
|
|
|
|
start_cmd="fsck_start"
|
|
|
|
stop_cmd=":"
|
|
|
|
|
2000-03-10 14:53:23 +03:00
|
|
|
fsck_start()
|
|
|
|
{
|
|
|
|
if [ -e /fastboot ]; then
|
|
|
|
echo "Fast boot: skipping disk checks."
|
2008-02-24 04:05:35 +03:00
|
|
|
return
|
2000-03-10 14:53:23 +03:00
|
|
|
fi
|
2008-02-24 04:05:35 +03:00
|
|
|
trap : 2 # Ignore SIGINT, SIGQUIT, so we
|
|
|
|
trap : 3 # enter single-user mode on failure.
|
|
|
|
|
|
|
|
echo "Starting file system checks:"
|
2010-02-18 02:32:07 +03:00
|
|
|
fsck -x / $fsck_flags
|
2009-07-11 00:02:21 +04:00
|
|
|
handle_fsck_error "$?"
|
2000-03-10 14:53:23 +03:00
|
|
|
}
|
|
|
|
|
2000-08-22 03:38:07 +04:00
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|