1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/bgfsck 108018 2002-12-18 07:21:31Z mckusick $ |
4# 5 6# PROVIDE: bgfsck 7# REQUIRE: cron devfs 8# KEYWORD: FreeBSD 9 10. /etc/rc.subr 11 12name="background-fsck" 13rcvar="background_fsck" |
14start_cmd="bgfsck_start" |
15stop_cmd=":" 16 |
17bgfsck_start () 18{ 19 bgfsck_msg='Starting background file system checks' 20 if [ ${background_fsck_delay:=0} -gt 0 ]; then 21 bgfsck_msg="${bgfsck_msg} in ${background_fsck_delay} seconds" 22 fi 23 echo "${bgfsck_msg}." 24 25 (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ 26 logger -p daemon.notice & 27} 28 |
29load_rc_config $name 30run_rc_command "$1" |