summaryrefslogtreecommitdiffstats
path: root/share/scripts/debootstrap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-10-25 12:46:12 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-10-25 12:46:12 +0000
commit287f09fde0c3bfdf7956d23a9fff9f0848fd976a (patch)
tree721d08d25f9af733c203f381c0223d79ecca78aa /share/scripts/debootstrap
parentSetting LC_ALL in container-shell. (diff)
downloadcompute-tools-287f09fde0c3bfdf7956d23a9fff9f0848fd976a.tar.xz
compute-tools-287f09fde0c3bfdf7956d23a9fff9f0848fd976a.zip
Switching from ftp.debian.org as default debian mirror to deb.debian.org in debconf script.
deb.debian.org offers https, see https://lists.debian.org/debian-devel/2016/10/msg00281.html Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'share/scripts/debootstrap')
-rwxr-xr-xshare/scripts/debootstrap12
1 files changed, 10 insertions, 2 deletions
diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap
index de9e501..e8ccd77 100755
--- a/share/scripts/debootstrap
+++ b/share/scripts/debootstrap
@@ -126,12 +126,20 @@ fi
ARCHITECTURE="${ARCHITECTURE:-$(dpkg --print-architecture)}"
DISTRIBUTION="${DISTRIBUTION:-jessie}"
-MIRROR="${MIRROR:-http://ftp.debian.org/debian}"
+MIRROR="${MIRROR:-https://deb.debian.org/debian}"
PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}"
+INCLUDE="dbus"
+
+case "${MIRROR}" in
+ https*)
+ INCLUDE="${INCLUDE},apt-transport-https,ca-certificates"
+ ;;
+esac
+
mkdir -p "${MACHINES}"
-debootstrap --arch=${ARCHITECTURE} --include=dbus ${DISTRIBUTION} ${MACHINES}/${NAME} ${MIRROR}
+debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${MACHINES}/${NAME} ${MIRROR}
chroot "${MACHINES}/${NAME}" apt-get clean
# Setting hostname