summaryrefslogtreecommitdiffstats
path: root/vagrant/definitions/tails-builder/generate-tails-builder-box.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vagrant/definitions/tails-builder/generate-tails-builder-box.sh')
-rwxr-xr-xvagrant/definitions/tails-builder/generate-tails-builder-box.sh49
1 files changed, 28 insertions, 21 deletions
diff --git a/vagrant/definitions/tails-builder/generate-tails-builder-box.sh b/vagrant/definitions/tails-builder/generate-tails-builder-box.sh
index fde0100..8a9d75d 100755
--- a/vagrant/definitions/tails-builder/generate-tails-builder-box.sh
+++ b/vagrant/definitions/tails-builder/generate-tails-builder-box.sh
@@ -7,6 +7,7 @@ set -u
ARCHITECTURE="amd64"
DISTRIBUTION="jessie"
+MIRROR="http://ftp.us.debian.org/debian"
USERNAME="vagrant"
PASSWORD="vagrant"
SIZE="20G"
@@ -16,27 +17,33 @@ TARGET_NAME="tails-builder-${ARCHITECTURE}-${DISTRIBUTION}-${DATE_STAMP}"
TARGET_IMG="${TARGET_NAME}.qcow2"
TARGET_BOX="${TARGET_NAME}.box"
-sudo vmdebootstrap \
- --arch "${ARCHITECTURE}" \
- --distribution "${DISTRIBUTION}" \
- --image "${TARGET_IMG}" \
- --convert-qcow2 \
- --enable-dhcp \
- --grub \
- --hostname "${HOSTNAME}" \
- --log-level "debug" \
- --mbr \
- --mirror "http://ftp.us.debian.org/debian" \
- --owner "${SUDO_USER:-${USER}}" \
- --kernel-package "linux-image-${ARCHITECTURE}" \
- --package "ca-certificates" \
- --package "wget" \
- --root-password="${PASSWORD}" \
- --size "${SIZE}" \
- --sudo \
- --user "${USERNAME}/${PASSWORD}" \
- --customize "$(pwd)/customize.sh" \
- --verbose
+sudo ARCHITECTURE="${ARCHITECTURE}" \
+ DISTRIBUTION="${DISTRIBUTION}" \
+ MIRROR="${MIRROR}" \
+ vmdebootstrap \
+ --arch "${ARCHITECTURE}" \
+ --distribution "${DISTRIBUTION}" \
+ --image "${TARGET_IMG}" \
+ --convert-qcow2 \
+ --enable-dhcp \
+ --grub \
+ --hostname "${HOSTNAME}" \
+ --log-level "debug" \
+ --mbr \
+ --mirror "${MIRROR}" \
+ --owner "${SUDO_USER:-${USER}}" \
+ --kernel-package "linux-image-${ARCHITECTURE}" \
+ --package "ca-certificates" \
+ --package "wget" \
+ --package "grub2" \
+ --package "openssh-server" \
+ --package "curl" \
+ --root-password="${PASSWORD}" \
+ --size "${SIZE}" \
+ --sudo \
+ --user "${USERNAME}/${PASSWORD}" \
+ --customize "$(pwd)/customize.sh" \
+ --verbose
/usr/share/vagrant-plugins/vagrant-libvirt/tools/create_box.sh \
"${TARGET_IMG}" "${TARGET_BOX}"