aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc
diff options
context:
space:
mode:
authorLeandro Lupori <luporl@FreeBSD.org>2020-03-18 13:09:47 +0000
committerLeandro Lupori <luporl@FreeBSD.org>2020-03-18 13:09:47 +0000
commite9f87d29a8b1e98451bac2d4ef77745469fe226f (patch)
tree5bdebad215cba4a18861702b737f608b405f8890 /libexec/rc
parentd80eccfc98603d5175baefcdc088cd3c63903bb0 (diff)
Notes
Diffstat (limited to 'libexec/rc')
-rw-r--r--libexec/rc/rc.conf1
-rwxr-xr-xlibexec/rc/rc.d/fsck6
2 files changed, 5 insertions, 2 deletions
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 1b7b235f47c49..079f1601205df 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -101,6 +101,7 @@ geli_autodetach="YES" # Automatically detach on last close.
root_rw_mount="YES" # Set to NO to inhibit remounting root read-write.
root_hold_delay="30" # Time to wait for root mount hold release.
+fsck_flags="-p" # May be changed to -f (or -f -y) to force a full fsck
fsck_y_enable="NO" # Set to YES to do fsck -y if the initial preen fails.
fsck_y_flags="-T ffs:-R -T ufs:-R" # Additional flags for fsck -y
background_fsck="YES" # Attempt to run fsck in the background where possible.
diff --git a/libexec/rc/rc.d/fsck b/libexec/rc/rc.d/fsck
index 747d357c4412e..a7fe9a15d5c32 100755
--- a/libexec/rc/rc.d/fsck
+++ b/libexec/rc/rc.d/fsck
@@ -25,10 +25,11 @@ fsck_start()
trap : 3
check_startmsgs && echo "Starting file system checks:"
+ # Background fsck can only be run with -p
if checkyesno background_fsck; then
fsck -F -p
else
- fsck -p
+ fsck ${fsck_flags}
fi
err=$?
@@ -37,10 +38,11 @@ fsck_start()
"available; retrying"
root_hold_wait
check_startmsgs && echo "Restarting file system checks:"
+ # Background fsck can only be run with -p
if checkyesno background_fsck; then
fsck -F -p
else
- fsck -p
+ fsck ${fsck_flags}
fi
err=$?
fi