Shift debian element to DIB_DISTRIBUTION_MIRROR
The ubuntu element supports simple replacement of sources.list by using the DIB_DISTRIBUTION_MIRROR environment variable. Drag the debian element into line by supporting both DIB_DEBIAN_MIRROR and the new shiny DIB_DISTRIBUTION_MIRROR. Change-Id: I9d5f8d1e3251965b34e55929182aa601a524fe8f
This commit is contained in:
parent
621376db44
commit
98fa6c882f
@ -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
|
mirrors for Debian can be problematic for `unstable`. Because apt does
|
||||||
not handle changing Packages files well across multiple out of sync
|
not handle changing Packages files well across multiple out of sync
|
||||||
mirrors, it is recommended that you choose a single mirror of debian,
|
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
|
Use of this element will also require the tool 'debootstrap' to be
|
||||||
available on your system. It should be available on Ubuntu, Debian,
|
available on your system. It should be available on Ubuntu, Debian,
|
||||||
|
@ -23,7 +23,12 @@ else
|
|||||||
fi
|
fi
|
||||||
DIB_RELEASE=${DIB_RELEASE:-unstable}
|
DIB_RELEASE=${DIB_RELEASE:-unstable}
|
||||||
DEBOOTSTRAP_TARBALL=$DIB_IMAGE_CACHE/debootstrap-${DISTRO_NAME}-${DIB_RELEASE}-${ARCH}.tar.gz
|
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:-}
|
http_proxy=${http_proxy:-}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
@ -41,7 +46,7 @@ else
|
|||||||
--include=${ADD_PACKAGES} \
|
--include=${ADD_PACKAGES} \
|
||||||
$DIB_RELEASE \
|
$DIB_RELEASE \
|
||||||
$TARGET_ROOT \
|
$TARGET_ROOT \
|
||||||
$DIB_DEBIAN_MIRROR"
|
$DIB_DISTRIBUTION_MIRROR"
|
||||||
echo "Customizing result for cloud use"
|
echo "Customizing result for cloud use"
|
||||||
sudo sed -i "s/PermitRootLogin yes/PermitRootLogin without-password/" $TARGET_ROOT/etc/ssh/sshd_config
|
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
|
sudo chroot ${TARGET_ROOT} adduser --gecos Debian-cloud-init-user --disabled-password --quiet debian
|
||||||
|
Loading…
Reference in New Issue
Block a user