diff options
author | Daniel Baumann <daniel@debian.org> | 2008-09-11 09:22:45 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:41 +0100 |
commit | 107125bae8b266b5a1cbef582bc51c3ef5e08657 (patch) | |
tree | 8abb98704e5f2af1f0723e16449ce3574f255931 /helpers/lh_binary_usb-hdd | |
parent | 759d82a2c44f4dbf2acd9b046ac944812f4e361e (diff) | |
download | live-build-107125bae8b266b5a1cbef582bc51c3ef5e08657.zip live-build-107125bae8b266b5a1cbef582bc51c3ef5e08657.tar.gz |
Automatically enforcing fat32 on usb-hdd when detecting partitions bigger than 2GB.
Diffstat (limited to 'helpers/lh_binary_usb-hdd')
-rwxr-xr-x | helpers/lh_binary_usb-hdd | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd index c122606..c93e225 100755 --- a/helpers/lh_binary_usb-hdd +++ b/helpers/lh_binary_usb-hdd @@ -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})" |