NetBSD/etc/rc.d/fsck

31 lines
511 B
Plaintext
Raw Normal View History

2000-03-10 14:53:23 +03:00
#!/bin/sh
#
# $NetBSD: fsck,v 1.11 2010/02/17 23:32:07 christos Exp $
2000-03-10 14:53:23 +03:00
#
# PROVIDE: fsck
# REQUIRE: localswap
2000-03-10 14:53:23 +03:00
$_rc_subr_loaded . /etc/rc.subr
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."
return
2000-03-10 14:53:23 +03:00
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 "$?"
2000-03-10 14:53:23 +03:00
}
load_rc_config $name
run_rc_command "$1"