summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Armstrong <synrg@debian.org>2007-09-25 14:59:23 -0300
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:27 +0100
commit3fdc7779ec16b57252c63d17b97051325ec5d3b8 (patch)
tree5e15f13ace17cdb1b044126b2c2f329fd6fb1b1e
parent748c19a321412358174b9e6d6126c97dd3bc984c (diff)
downloadvyos-live-build-3fdc7779ec16b57252c63d17b97051325ec5d3b8.tar.gz
vyos-live-build-3fdc7779ec16b57252c63d17b97051325ec5d3b8.zip
genext2fs: new switch name: --reserved-percentage; thanks, Zagiox
-rwxr-xr-xhelpers/lh_binary_rootfs10
1 files changed, 8 insertions, 2 deletions
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index 0fe90433c..7871d77f1 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -112,10 +112,16 @@ case "${LH_CHROOT_FILESYSTEM}" in
DU_DIM="$(du -ks chroot/chroot | cut -f1)"
REAL_DIM="$(expr ${DU_DIM} + ${DU_DIM} / 20)" # Just 5% more to be sure, need something more sophistcated here...
+ if [ "${LH_DISTRIBUTION}" = "etch" ]
+ then
+ RESERVED_PERCENTAGE="--reserved-blocks"
+ else
+ RESERVED_PERCENTAGE="--reserved-percentage"
+ fi
case "${LH_CHROOT_BUILD}" in
enabled)
- Chroot "genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root=chroot filesystem.ext2"
+ Chroot "genext2fs --size-in-blocks=${REAL_DIM} ${RESERVED_PERCENTAGE}=0 --root=chroot filesystem.ext2"
# Move image
mv chroot/filesystem.ext2 binary/${INITFS}
@@ -123,7 +129,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
;;
disabled)
- genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root=chroot binary/${INITFS}/filesystem.ext2
+ genext2fs --size-in-blocks=${REAL_DIM} ${RESERVED_PERCENTAGE}=0 --root=chroot binary/${INITFS}/filesystem.ext2
;;
esac