From 91c9c059ffbeb0b2e74e6b05098bc3d0de08bab5 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 2 Mar 2013 23:33:30 -0300 Subject: [PATCH] Remove box image cache from setup script and fix vagrant keys path --- setup-vagrant-dev-box | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setup-vagrant-dev-box b/setup-vagrant-dev-box index 5917bef..a19771b 100755 --- a/setup-vagrant-dev-box +++ b/setup-vagrant-dev-box @@ -1,5 +1,12 @@ #!/usr/bin/env ruby +# I know, we should be using something like puppet or chef but trust me, this +# started as a small script :-) +# Please check https://github.com/fgrehm/vagrant-lxc/issues/7 for the current status. + +# In case something goes wrong after the machine has been set up, you can run this +# script again and it will ask you if you want to restore a clean snapshot. + raise 'You should not run this script from the dev box' if ENV['USER'] == 'vagrant' require 'bundler' @@ -119,12 +126,9 @@ vagrant_ssh 'sudo chown vagrant:vagrant /etc/rinetd.conf' vagrant_ssh 'cd /vagrant && bundle && cd /vagrant/dev && bundle' # Setup vagrant default ssh key -vagrant_keys_path = '/vagrant/vagrant/keys' +vagrant_keys_path = '/vagrant/vendor/vagrant/keys' vagrant_ssh "mkdir -p ~/.ssh && cd /vagrant && cp #{vagrant_keys_path}/vagrant ~/.ssh/id_rsa && cp #{vagrant_keys_path}/vagrant.pub ~/.ssh/id_rsa.pub && chmod 600 ~/.ssh/id_rsa" -# Setup lxc cache -vagrant_ssh "sudo mkdir -p /var/cache/lxc/cloud-quantal && sudo cp /vagrant/cache/#{IMAGE_NAME} /var/cache/lxc/cloud-quantal/#{IMAGE_NAME}" - # Click sh 'vagrant halt' conf = JSON.parse File.read('.vagrant')