From eba671c54dd9b24a2ce1431aebdac74c8d687e14 Mon Sep 17 00:00:00 2001 From: Cam Cope Date: Sun, 5 Apr 2015 18:35:17 -0700 Subject: [PATCH] remove /tmp cleanup, fixes lvm rootfs --- lib/vagrant-lxc/action.rb | 2 -- .../action/remove_temporary_files.rb | 23 ------------------- 2 files changed, 25 deletions(-) delete mode 100644 lib/vagrant-lxc/action/remove_temporary_files.rb diff --git a/lib/vagrant-lxc/action.rb b/lib/vagrant-lxc/action.rb index 49f0707..0b2a82a 100644 --- a/lib/vagrant-lxc/action.rb +++ b/lib/vagrant-lxc/action.rb @@ -13,7 +13,6 @@ require 'vagrant-lxc/action/handle_box_metadata' require 'vagrant-lxc/action/prepare_nfs_settings' require 'vagrant-lxc/action/prepare_nfs_valid_ids' require 'vagrant-lxc/action/private_networks' -require 'vagrant-lxc/action/remove_temporary_files' require 'vagrant-lxc/action/setup_package_files' require 'vagrant-lxc/action/warn_networks' @@ -126,7 +125,6 @@ module Vagrant end b2.use ClearForwardedPorts - b2.use RemoveTemporaryFiles b2.use GcPrivateNetworkBridges b2.use Builtin::Call, Builtin::GracefulHalt, :stopped, :running do |env2, b3| if !env2[:result] diff --git a/lib/vagrant-lxc/action/remove_temporary_files.rb b/lib/vagrant-lxc/action/remove_temporary_files.rb deleted file mode 100644 index 81a2f11..0000000 --- a/lib/vagrant-lxc/action/remove_temporary_files.rb +++ /dev/null @@ -1,23 +0,0 @@ -module Vagrant - module LXC - module Action - class RemoveTemporaryFiles - def initialize(app, env) - @app = app - @logger = Log4r::Logger.new("vagrant::lxc::action::remove_tmp_files") - end - - def call(env) - # Continue execution, we need the container to be stopped - @app.call env - - if env[:machine].state.id == :stopped - @logger.debug 'Removing temporary files' - tmp_path = env[:machine].provider.driver.rootfs_path.join('tmp') - env[:machine].provider.sudo_wrapper.run('rm', '-rf', "#{tmp_path}/*") - end - end - end - end - end -end