rcopy.sh: optinize partition after filesystemcheck.
This commit is contained in:
parent
d3cfc57799
commit
d986a12ff4
5
rcopy.sh
5
rcopy.sh
@ -483,9 +483,14 @@ if $extern_usb_disk || $extern_sata_disk ; then
|
||||
declare -i mount_count=`$tune2fs -l $backup_partition | $grep "Mount count" | $cut -d ":" -f 2`
|
||||
declare -i max_mount_count=`$tune2fs -l $backup_partition | $grep "Maximum mount count" | $cut -d ":" -f 2`
|
||||
if [ $mount_count -ge $max_mount_count ]; then
|
||||
echo -e "Check partition '${backup_partition}' - Run: $e2fsck -p $backup_partition .."
|
||||
$e2fsck -p $backup_partition
|
||||
if [ $? -gt 0 ]; then
|
||||
echo -e "\n[ERROR] filecheck on $backup_partition failed.."
|
||||
else
|
||||
echo ""
|
||||
echo -e "Check agaim in order to optimize - Run: $e2fsck -fy $backup_partition .."
|
||||
$e2fsck -fy $backup_partition
|
||||
fi
|
||||
$tune2fs -C 0 $backup_partition
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user