diff --git a/elements/debian/README.md b/elements/debian/README.md index eab538569..885387cea 100644 --- a/elements/debian/README.md +++ b/elements/debian/README.md @@ -10,3 +10,7 @@ and pass it in via `DIB_DISTRIBUTION_MIRROR`. Use of this element will also require the tool 'debootstrap' to be available on your system. It should be available on Ubuntu, Debian, 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. diff --git a/elements/debian/root.d/08-debootstrap b/elements/debian/root.d/08-debootstrap index d33b3a4fe..13aa84b1b 100755 --- a/elements/debian/root.d/08-debootstrap +++ b/elements/debian/root.d/08-debootstrap @@ -32,7 +32,7 @@ DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://http.debian.net/debian http_proxy=${http_proxy:-} set -x -if [ -n "$DIB_OFFLINE" ] && [ -f $DEBOOTSTRAP_TARBALL ] ; then +if [ -n "$DIB_OFFLINE" -o -n "${DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE:-}" ] && [ -f $DEBOOTSTRAP_TARBALL ] ; then echo $DEBOOTSTRAP_TARBALL found in cache. Using. sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DEBOOTSTRAP_TARBALL else