summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbertagaz <bertagaz@ptitcanardnoir.org>2016-12-01 17:04:33 +0100
committerbertagaz <bertagaz@ptitcanardnoir.org>2016-12-01 17:04:33 +0100
commit374caea84223e1a353b9f989212cb2c43225b3c2 (patch)
tree26232db294aed1d2806c80f3821f334dd2880a75
parentcafb862d0a3f2bd52d00688b1d236e75cde430b4 (diff)
parentb4a61666a1ccec0665575f3e0a10c2b0909cf932 (diff)
Merge remote-tracking branch 'origin/wip/feature/11979-additional-disk-for-apt-cacher-ng' into wip/feature/11972-11979-vagrant
-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