bgfsck (197947) | bgfsck (229783) |
---|---|
1#!/bin/sh 2# | 1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/bgfsck 197947 2009-10-10 22:17:03Z dougb $ | 3# $FreeBSD: head/etc/rc.d/bgfsck 229783 2012-01-07 16:10:32Z uqs $ |
4# 5 6# PROVIDE: bgfsck 7# REQUIRE: cron devfs syslogd 8# KEYWORD: nojail 9 10. /etc/rc.subr 11 --- 5 unchanged lines hidden (view full) --- 17bgfsck_start () 18{ 19 if [ -z "${rc_force}" ]; then 20 background_fsck_delay=${background_fsck_delay:=0} 21 else 22 background_fsck_delay=0 23 fi 24 if [ ${background_fsck_delay} -lt 0 ]; then | 4# 5 6# PROVIDE: bgfsck 7# REQUIRE: cron devfs syslogd 8# KEYWORD: nojail 9 10. /etc/rc.subr 11 --- 5 unchanged lines hidden (view full) --- 17bgfsck_start () 18{ 19 if [ -z "${rc_force}" ]; then 20 background_fsck_delay=${background_fsck_delay:=0} 21 else 22 background_fsck_delay=0 23 fi 24 if [ ${background_fsck_delay} -lt 0 ]; then |
25 echo "Background file system checks delayed indefinitly" | 25 echo "Background file system checks delayed indefinitely" |
26 return 0 27 fi 28 29 bgfsck_msg='Starting background file system checks' 30 if [ "${background_fsck_delay}" -gt 0 ]; then 31 bgfsck_msg="${bgfsck_msg} in ${background_fsck_delay} seconds" 32 fi 33 if [ -z "${rc_force}" ]; then 34 check_startmsgs && echo "${bgfsck_msg}." 35 fi 36 37 (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ 38 logger -p daemon.notice -t fsck & 39} 40 41load_rc_config $name 42run_rc_command "$1" | 26 return 0 27 fi 28 29 bgfsck_msg='Starting background file system checks' 30 if [ "${background_fsck_delay}" -gt 0 ]; then 31 bgfsck_msg="${bgfsck_msg} in ${background_fsck_delay} seconds" 32 fi 33 if [ -z "${rc_force}" ]; then 34 check_startmsgs && echo "${bgfsck_msg}." 35 fi 36 37 (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ 38 logger -p daemon.notice -t fsck & 39} 40 41load_rc_config $name 42run_rc_command "$1" |