summaryrefslogtreecommitdiffstats
path: root/src/etc/pfSense-rc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-11-11 15:22:29 -0500
committerjim-p <jimp@pfsense.org>2016-11-11 15:22:29 -0500
commit92a78939583e2be7f7cc52d045bc48a2e2264d1d (patch)
tree48b15bf40c5da9a1deedbd6939e803178764662e /src/etc/pfSense-rc
parent464a540a3b7f7c5351526dbc515ade4554b1976e (diff)
downloadpfsense-92a78939583e2be7f7cc52d045bc48a2e2264d1d.zip
pfsense-92a78939583e2be7f7cc52d045bc48a2e2264d1d.tar.gz
Add options to console menu reboot selection to reboot into single user mode and to reboot and force a filesystem check. Implements #6639
Diffstat (limited to 'src/etc/pfSense-rc')
-rwxr-xr-xsrc/etc/pfSense-rc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/etc/pfSense-rc b/src/etc/pfSense-rc
index caa0316..783b5a6 100755
--- a/src/etc/pfSense-rc
+++ b/src/etc/pfSense-rc
@@ -60,9 +60,17 @@ if [ ! -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then
/sbin/ddb /etc/ddb.conf
fi
-if [ -e /root/force_fsck ]; then
- echo "Forcing filesystem(s) check..."
- /sbin/fsck -y -F -t ufs
+fsck_forced_iterations=`/bin/kenv pfsense.fsck.force`
+if [ ! -z "${fsck_forced_iterations}" ]; then
+ echo "Forcing filesystem check (${fsck_forced_iterations} times)..."
+ while [ ${fsck_forced_iterations} -gt 0 ]; do
+ /sbin/fsck -y -F -t ufs
+ fsck_forced_iterations=$((fsck_forced_iterations - 1))
+ done
+fi
+
+if [ -e /root/force_growfs ]; then
+ /etc/rc.d/growfs onestart
fi
FSCK_ACTION_NEEDED=0
OpenPOWER on IntegriCloud