Automatically enforcing fat32 on usb-hdd when detecting partitions bigger than 2GB.

This commit is contained in:
Daniel Baumann 2008-09-11 09:22:45 +02:00
parent 759d82a2c4
commit 107125bae8
1 changed files with 9 additions and 0 deletions

View File

@ -98,6 +98,15 @@ then
export LH_BINARY_FILESYSTEM
fi
# Enforce fat32 if we have images in total bigger than 2GB
if [ "${LH_BINARY_FILESYSTEM}" = "fat16" ] && [ "$(cd binary && du -s | awk '{ print $1 }')" -gt "1900000" ]
then
Echo_warning "FAT16 doesn't support partitions larger than 2GB, automatically enforcing FAT32"
LH_BINARY_FILESYSTEM="fat32"
export LH_BINARY_FILESYSTEM
fi
# Everything which comes here needs to be cleaned up,
DU_DIM="$(du -ms binary | cut -f1)"
REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LH_BINARY_FILESYSTEM})"