diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-03-04 20:24:57 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-03-04 20:24:57 +0000 |
commit | b5d8499ca8d182867e57fc72cdf481ebae50cfd8 (patch) | |
tree | ec654643e442f63eae044191678a108d2fb8133d /etc/rc | |
parent | d5f60dba2dd94347b005a4540ece7caf012e0ca2 (diff) | |
download | pfsense-b5d8499ca8d182867e57fc72cdf481ebae50cfd8.zip pfsense-b5d8499ca8d182867e57fc72cdf481ebae50cfd8.tar.gz |
Trigger a FSCK if required before switching on softupdates
Diffstat (limited to 'etc/rc')
-rwxr-xr-x | etc/rc | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -41,7 +41,14 @@ fi # Enable Softupdates if enablesoftupdates is found in config.xml SOFTUPDATES=`/usr/bin/grep "enablesoftupdates" /cf/conf/config.xml | wc -l` if [ $SOFTUPDATES -gt 0 ]; then - /sbin/tunefs -n enable / 2>/dev/null + FILESYSTEM=`cat /etc/fstab | grep "/" | grep ufs | awk '{ print $1 }'` + /sbin/tunefs -n enable $FILESYSTEM 2>/dev/null + if [ $? != 0 ]; then + echo "Cleaning filesystem..." + fsck -y $FILESYSTEM + echo "Attempting soft updates enable again..." + /sbin/tunefs -n enable $FILESYSTEM + fi fi # Enable console output if its muted. |