diff --git a/elements/debian/README.md b/elements/debian/README.md index 852a19dd..eab53856 100644 --- a/elements/debian/README.md +++ b/elements/debian/README.md @@ -5,7 +5,7 @@ Note that the default Debian series is `unstable`, and the default mirrors for Debian can be problematic for `unstable`. Because apt does not handle changing Packages files well across multiple out of sync mirrors, it is recommended that you choose a single mirror of debian, -and pass it in via `DIB_DEBIAN_MIRROR`. +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, diff --git a/elements/debian/root.d/08-debootstrap b/elements/debian/root.d/08-debootstrap index b687b063..ea9a6e9a 100755 --- a/elements/debian/root.d/08-debootstrap +++ b/elements/debian/root.d/08-debootstrap @@ -23,7 +23,12 @@ else fi DIB_RELEASE=${DIB_RELEASE:-unstable} DEBOOTSTRAP_TARBALL=$DIB_IMAGE_CACHE/debootstrap-${DISTRO_NAME}-${DIB_RELEASE}-${ARCH}.tar.gz -DIB_DEBIAN_MIRROR=${DIB_DEBIAN_MIRROR:-http://http.debian.net/debian} +if [ -n "$DIB_DEBIAN_MIRROR" ]; then + echo "Use of DIB_DEBIAN_MIRROR environment variable to configure mirror is deprecated." + echo "Please use DIB_DISTRIBUTION_MIRROR instead." + DIB_DISTRIBUTION_MIRROR=$DIB_DEBIAN_MIRROR +fi +DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://http.debian.net/debian} http_proxy=${http_proxy:-} set -x @@ -41,7 +46,7 @@ else --include=${ADD_PACKAGES} \ $DIB_RELEASE \ $TARGET_ROOT \ - $DIB_DEBIAN_MIRROR" + $DIB_DISTRIBUTION_MIRROR" echo "Customizing result for cloud use" sudo sed -i "s/PermitRootLogin yes/PermitRootLogin without-password/" $TARGET_ROOT/etc/ssh/sshd_config sudo chroot ${TARGET_ROOT} adduser --gecos Debian-cloud-init-user --disabled-password --quiet debian