remove /tmp cleanup, fixes lvm rootfs
This commit is contained in:
parent
6718fed241
commit
eba671c54d
2 changed files with 0 additions and 25 deletions
|
@ -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]
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue