mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Trigger a FSCK if required before switching on softupdates
This commit is contained in:
parent
d5f60dba2d
commit
b5d8499ca8
9
etc/rc
9
etc/rc
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user