vagrant: Rearrange steps of provision script

- Disable automatic upgrades earlier in the script. This makes it more
  likely that unattended-upgrades will be disabled before it has a
  chance to run.

- Move apt commands to the end. In the event that unattended-upgrades
  is running anyway, these command can fail and cause further steps to
  be skipped.

Closes #1506

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2019-03-05 22:17:19 -05:00 committed by Sunil Mohan Adapa
parent 8d2923b8dd
commit 8b74f65f38
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

16
Vagrantfile vendored
View File

@ -24,22 +24,22 @@ Vagrant.configure(2) do |config|
vb.memory = 2048
vb.linked_clone = true
end
config.vm.provision "shell", run: 'always', inline: <<-SHELL
# Disable automatic upgrades
/vagrant/actions/upgrades disable-auto
# Do not run system plinth
systemctl stop plinth
systemctl disable plinth
SHELL
config.vm.provision "shell", inline: <<-SHELL
cd /vagrant/
./setup.py install
systemctl daemon-reload
apt-get update
# In case new dependencies conflict with old dependencies
apt-mark hold freedombox
DEBIAN_FRONTEND=noninteractive apt-get install -y $(plinth --list-dependencies)
apt-mark unhold freedombox
systemctl daemon-reload
SHELL
config.vm.provision "shell", run: 'always', inline: <<-SHELL
# Do not run system plinth
systemctl stop plinth
systemctl disable plinth
# Disable automatic upgrades
/vagrant/actions/upgrades disable-auto
# Install ncurses-term
DEBIAN_FRONTEND=noninteractive apt-get install -y ncurses-term
SHELL