Add DIB_DEBOOTSTRAP_EXTRA_ARGS environment variable

This allows extra arguments to be passed to the debootstrap
command when creating an image using the debian element.

Change-Id: I87eb856365ff6a17f051e2e56587235648328d57
Co-Authored-By: Ghe Rivero <ghe.rivero@gmail.com>
This commit is contained in:
Tim Potter 2014-05-07 14:15:30 +10:00 committed by Ghe Rivero
parent 97678dcda5
commit 018b1d4147
2 changed files with 7 additions and 0 deletions

View File

@ -19,3 +19,8 @@ and Fedora.
The `DIB_OFFLINE` or more specific `DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE`
variables can be set to prefer the use of a pre-cached root filesystem
tarball.
The `DIB_DEBOOTSTRAP_EXTRA_ARGS` environment variable may be used to
pass extra arguments to the debootstrap command used to create the
base filesystem image. If --keyring is is used in `DIB_DEBOOTSTRAP_EXTRA_ARGS`,
it will override `DIB_DEBIAN_KEYRING` if that is used as well.

View File

@ -22,6 +22,7 @@ fi
DISTRO_NAME=${DISTRO_NAME:-debian}
DIB_RELEASE=${DIB_RELEASE:-unstable}
DIB_DEBIAN_ALT_INIT_PACKAGE=${DIB_DEBIAN_ALT_INIT_PACKAGE:-sysvinit}
DIB_DEBOOTSTRAP_EXTRA_ARGS=${DIB_DEBOOTSTRAP_EXTRA_ARGS:-}
DEBOOTSTRAP_TARBALL=$DIB_IMAGE_CACHE/debootstrap-${DISTRO_NAME}-${DIB_DEBIAN_ALT_INIT_PACKAGE}-${DIB_RELEASE}-${ARCH}.tar.gz
if [ -n "${DIB_DEBIAN_MIRROR:-}" ]; then
echo "Use of DIB_DEBIAN_MIRROR environment variable to configure mirror is deprecated."
@ -48,6 +49,7 @@ else
--arch=${ARCH} \
--include=${ADD_PACKAGES} \
$KEYRING_OPT \
$DIB_DEBOOTSTRAP_EXTRA_ARGS \
$DIB_RELEASE \
$TARGET_ROOT \
$DIB_DISTRIBUTION_MIRROR \