diff options
author | Michael Stummvoll <michael@stummi.org> | 2013-04-02 13:59:38 +0200 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2013-05-06 14:50:07 +0200 |
commit | 428da01aea94c7d4667c0be1b7498f8edd6772e0 (patch) | |
tree | 0833ef49d0f7a7a187de24b82231586b297864c8 /scripts/build/binary_hdd | |
parent | 765ae792d45107185c2a08603cfbcaf96c588954 (diff) | |
download | vyos-live-build-428da01aea94c7d4667c0be1b7498f8edd6772e0.tar.gz vyos-live-build-428da01aea94c7d4667c0be1b7498f8edd6772e0.zip |
Using LB_HDD_SIZE to determine the size of the image.
If LB_HDD_SIZE is "auto" the size will be determined automatically as before
else it will be the given size in MB.
Also setting the default for this to "auto"
Diffstat (limited to 'scripts/build/binary_hdd')
-rwxr-xr-x | scripts/build/binary_hdd | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd index 9f075212b..6527a3c85 100755 --- a/scripts/build/binary_hdd +++ b/scripts/build/binary_hdd @@ -121,8 +121,14 @@ then fi # Everything which comes here needs to be cleaned up, -DU_DIM="$(du -ms binary | cut -f1)" -REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_BINARY_FILESYSTEM})" +if [ "$LB_HDD_SIZE" = "auto" ]; +then + DU_DIM="$(du -ms binary | cut -f1)" + REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_BINARY_FILESYSTEM})" +else + REAL_DIM=$LB_HDD_SIZE +fi + dd if=/dev/zero of=chroot/binary.img bs=1024k count=0 seek=${REAL_DIM} FREELO="$(${LB_LOSETUP} -f)" if [ ! -b chroot/${FREELO} ] |