Trigger a FSCK if required before switching on softupdates

This commit is contained in:
Scott Ullrich 2007-03-04 20:24:57 +00:00
parent d5f60dba2d
commit b5d8499ca8

9
etc/rc
View File

@ -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.