diff options
author | jim-p <jimp@pfsense.org> | 2013-02-02 21:36:39 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-02-02 21:36:39 -0500 |
commit | 990fa101b6a2ce09e813a8d58f0f43178e54fc45 (patch) | |
tree | 2dafe2bc621a896fc8bc3a2e9bfda1e981e92b84 | |
parent | 2085c6de5de1d9cd8864f85628f775bce5853012 (diff) | |
download | pfsense-990fa101b6a2ce09e813a8d58f0f43178e54fc45.zip pfsense-990fa101b6a2ce09e813a8d58f0f43178e54fc45.tar.gz |
Add a means to force a fsck (on rare occasions the fs is not marked dirty, but still needs fsck run to fix errors)
-rwxr-xr-x | etc/rc | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -31,6 +31,14 @@ if [ "$PLATFORM" = "pfSense" ]; then /etc/rc.dumpon fi +if [ -e /root/force_fsck ]; then + echo "Forcing filesystem check..." + /sbin/fsck -fy -t ufs / + if [ "$PLATFORM" = "nanobsd" ]; then + /sbin/fsck -fy -t ufs /cf + fi +fi + TUNEFS_STATUS=`/sbin/tunefs -p / 2>&1 | /usr/bin/grep trim: | /usr/bin/awk '{print $4;}'` if [ -e /root/TRIM_set ] && [ "${TUNEFS_STATUS}" = "disabled" ]; then echo "Enabling TRIM support" @@ -97,6 +105,7 @@ if [ ! "$PLATFORM" = "cdrom" ] ; then fi fi +/bin/rm -f /root/force_fsck /bin/rm -f /root/TRIM_set /bin/rm -f /root/TRIM_unset |