aboutsummaryrefslogtreecommitdiffstats
path: root/export-image
diff options
context:
space:
mode:
authorSerge Schneider <[email protected]>2017-06-20 16:13:59 +0100
committerSerge Schneider <[email protected]>2017-06-20 16:13:59 +0100
commit02728fe65e3473ba7da03ab7862ed0cf2a05a746 (patch)
treeaeff542d471c6cb494e0fb748699694c2d00d432 /export-image
parente583c18ebaa9608182ebb4085cbd38fc74a6f979 (diff)
export-image: use apparent size when calculating disk usage
Diffstat (limited to 'export-image')
-rwxr-xr-xexport-image/prerun.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/export-image/prerun.sh b/export-image/prerun.sh
index 661fc4e..9f54ce6 100755
--- a/export-image/prerun.sh
+++ b/export-image/prerun.sh
@@ -8,8 +8,8 @@ rm -f ${IMG_FILE}
rm -rf ${ROOTFS_DIR}
mkdir -p ${ROOTFS_DIR}
-BOOT_SIZE=$(du -s ${EXPORT_ROOTFS_DIR}/boot --block-size=1 | cut -f 1)
-TOTAL_SIZE=$(du -s ${EXPORT_ROOTFS_DIR} --exclude var/cache/apt/archives --block-size=1 | cut -f 1)
+BOOT_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR}/boot --block-size=1 | cut -f 1)
+TOTAL_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR} --exclude var/cache/apt/archives --block-size=1 | cut -f 1)
IMG_SIZE=$((BOOT_SIZE + TOTAL_SIZE + (400 * 1024 * 1024)))