diff --git a/Makefile b/Makefile index fbd7d8a..99b1723 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,9 @@ TEMPLATE_ENV_WHITELIST += \ DIST DISTRIBUTION TEMPLATE_SCRIPTS TEMPLATE_NAME TEMPLATE_FLAVOR \ TEMPLATE_FLAVOR_DIR TEMPLATE_OPTIONS APPMENUS_DIR \ VERBOSE DEBUG PATH BUILDER_DIR SRC_DIR DISCARD_PREPARED_IMAGE \ - TEMPLATE_ROOT_WITH_PARTITIONS USE_QUBES_REPO_VERSION \ - USE_QUBES_REPO_TESTING BUILDER_TURBO_MODE REPO_PROXY FEDORA_MIRROR \ + TEMPLATE_ROOT_WITH_PARTITIONS TEMPLATE_ROOT_SIZE \ + USE_QUBES_REPO_VERSION USE_QUBES_REPO_TESTING \ + BUILDER_TURBO_MODE REPO_PROXY FEDORA_MIRROR \ CENTOS_MIRROR EPEL_MIRROR # Make sure names are < 32 characters, process aliases diff --git a/prepare_image b/prepare_image index 69d2582..7a667fd 100755 --- a/prepare_image +++ b/prepare_image @@ -28,6 +28,10 @@ if [ "${VERBOSE}" == "1" ]; then export YUM_OPTS="${YUM_OPTS} -q" fi +if [ -z "$TEMPLATE_ROOT_SIZE" ]; then + TEMPLATE_ROOT_SIZE=10G +fi + # ------------------------------------------------------------------------------ # Make sure INSTALLDIR exists # ------------------------------------------------------------------------------ @@ -54,7 +58,7 @@ if [ -f "${IMG}" ]; then fi else echo "-> Initializing empty image..." - truncate -s 10G "${IMG}" || exit 1 + truncate -s "$TEMPLATE_ROOT_SIZE" "${IMG}" || exit 1 if [ "0$TEMPLATE_ROOT_WITH_PARTITIONS" -eq 1 ]; then echo "-> Creating partition table"