diff --git a/lib/vagrant-lxc/action/destroy.rb b/lib/vagrant-lxc/action/destroy.rb index e249093..a0014c1 100644 --- a/lib/vagrant-lxc/action/destroy.rb +++ b/lib/vagrant-lxc/action/destroy.rb @@ -3,6 +3,7 @@ module Vagrant module Action class Destroy < BaseAction def call(env) + env[:ui].info I18n.t("vagrant.actions.vm.destroy.destroying") env[:machine].provider.container.destroy env[:machine].id = nil @app.call env diff --git a/lib/vagrant-lxc/action/handle_box_metadata.rb b/lib/vagrant-lxc/action/handle_box_metadata.rb index a03348f..a6198c3 100644 --- a/lib/vagrant-lxc/action/handle_box_metadata.rb +++ b/lib/vagrant-lxc/action/handle_box_metadata.rb @@ -12,15 +12,9 @@ module Vagrant end def call(env) - # We _could_ extract the rootfs to a folder under ~/.vagrant.d/boxes - # but it would open up for a few issues: - # * The rootfs owner is the root user, so we'd need to prepend "sudo" to - # `vagrant box remove` - # * We'd waste a lot of disk space: a compressed Ubuntu rootfs fits 80mb, - # extracted it takes 262mb - # * If something goes wrong during the Container creation process and - # somehow we don't handle, writing to /tmp means that things will get - # flushed on next reboot + env[:ui].info I18n.t("vagrant.actions.vm.import.importing", + :name => env[:machine].box.name) + rootfs_cache = Dir.mktmpdir(TEMP_PREFIX) box = env[:machine].box template_name = "vagrant-#{box.name}" diff --git a/lib/vagrant-lxc/action/share_folders.rb b/lib/vagrant-lxc/action/share_folders.rb index 4afcce8..81ab3b7 100644 --- a/lib/vagrant-lxc/action/share_folders.rb +++ b/lib/vagrant-lxc/action/share_folders.rb @@ -44,7 +44,7 @@ module Vagrant end def add_start_opts - @env[:ui].info I18n.t("vagrant.actions.vm.share_folders.creating") + @env[:ui].info I18n.t("vagrant.actions.lxc.share_folders.preparing") folders = [] shared_folders.each do |id, data| @@ -53,6 +53,8 @@ module Vagrant :hostpath => File.expand_path(data[:hostpath], @env[:root_path]), :guestpath => data[:guestpath] } + @env[:ui].info(I18n.t("vagrant.actions.vm.share_folders.mounting_entry", + :guest_path => data[:guestpath])) end config = @env[:machine].provider_config @env[:machine].provider.container.share_folders(folders, config) diff --git a/locales/en.yml b/locales/en.yml index 786b5ef..4224875 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -1,5 +1,10 @@ en: vagrant: + actions: + lxc: + share_folders: + preparing: Setting up mount entries for shared folders... + errors: lxc_execute_error: |- There was an error executing %{command} diff --git a/spec/unit/action/handle_box_metadata_spec.rb b/spec/unit/action/handle_box_metadata_spec.rb index f661132..7a76015 100644 --- a/spec/unit/action/handle_box_metadata_spec.rb +++ b/spec/unit/action/handle_box_metadata_spec.rb @@ -9,7 +9,7 @@ describe Vagrant::LXC::Action::HandleBoxMetadata do let(:box_directory) { Pathname.new('/path/to/box') } let(:machine) { mock(:machine, box: box) } let(:app) { mock(:app, call: true) } - let(:env) { {machine: machine} } + let(:env) { {machine: machine, ui: stub(info: true)} } let(:tmpdir) { '/tmp/rootfs/dir' } subject { described_class.new(app, env) }