summaryrefslogtreecommitdiffstats
path: root/share/scripts/debootstrap
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2016-10-25 13:13:01 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2016-10-25 13:13:01 +0000
commit07357f5916ea7380a6008b6e29d50c1889311491 (patch)
treed9f0c5fa35941b7484aaf575cc1aac90d7ac4b20 /share/scripts/debootstrap
parentReleasing debian version 20160801-1. (diff)
downloadopen-infrastructure-compute-tools-07357f5916ea7380a6008b6e29d50c1889311491.tar.xz
open-infrastructure-compute-tools-07357f5916ea7380a6008b6e29d50c1889311491.zip
Merging upstream version 20161101.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'share/scripts/debootstrap')
-rwxr-xr-xshare/scripts/debootstrap14
1 files changed, 11 insertions, 3 deletions
diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap
index de9e501..1ead471 100755
--- a/share/scripts/debootstrap
+++ b/share/scripts/debootstrap
@@ -125,13 +125,21 @@ then
fi
ARCHITECTURE="${ARCHITECTURE:-$(dpkg --print-architecture)}"
-DISTRIBUTION="${DISTRIBUTION:-jessie}"
-MIRROR="${MIRROR:-http://ftp.debian.org/debian}"
+DISTRIBUTION="${DISTRIBUTION:-stretch}"
+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