Merge "Shift debian element to DIB_DISTRIBUTION_MIRROR"

This commit is contained in:
Jenkins 2014-02-20 04:22:26 +00:00 committed by Gerrit Code Review
commit 06ecc6c5e8
2 changed files with 8 additions and 3 deletions

View File

@ -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,

View File

@ -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