summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vagrant/Vagrantfile2
-rwxr-xr-xvagrant/provision/setup-tails-builder13
2 files changed, 2 insertions, 13 deletions
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
index 58fa2b0..a066b46 100644
--- a/vagrant/Vagrantfile
+++ b/vagrant/Vagrantfile
@@ -43,6 +43,6 @@ Vagrant.configure("2") do |config|
VM_MEMORY_FOR_DISK_BUILDS
cpus = ENV['TAILS_BUILD_CPUS']
domain.cpus = cpus unless cpus.nil?
- domain.storage :file, :size => '15G', :allow_existing => true, :cache => 'none'
+ domain.storage :file, :size => '15G', :allow_existing => true, :cache => 'none', path: => '/var/lib/libvirt/images/apt-cacher-ng.qcow2'
end
end
diff --git a/vagrant/provision/setup-tails-builder b/vagrant/provision/setup-tails-builder
index ae233f4..d329174 100755
--- a/vagrant/provision/setup-tails-builder
+++ b/vagrant/provision/setup-tails-builder
@@ -55,19 +55,8 @@ if [ ! -b /dev/vdb1 ]; then
mkfs.ext4 /dev/vdb1
fi
-if [ -d /var/cache/apt-cacher-ng/ ]; then
- if ! mountpoint -q /var/cache/apt-cacher-ng; then
- echo "A previous installation has been detected, migrating APT data."
- mount /dev/vdb1 /mnt
- rsync -a /var/cache/apt-cacher-ng/ /mnt/
- rm -rf /var/cache/apt-cacher-ng/*
- umount /mnt/
- echo "Migration done. You may want to recreate your vagrant box to save disk space."
- fi
-
-else
+[ -d /var/cache/apt-cacher-ng/ ] || \
adduser --quiet --system --group --home /var/cache/apt-cacher-ng apt-cacher-ng
-fi
if ! mountpoint -q /var/cache/apt-cacher-ng; then
mount /dev/vdb1 /var/cache/apt-cacher-ng