Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
move /tmp cleanup to attach command, fixes lvm rootfs
Browse files Browse the repository at this point in the history
  • Loading branch information
ccope committed Apr 6, 2015
1 parent c9cd671 commit 12c1ba2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
2 changes: 0 additions & 2 deletions lib/vagrant-lxc/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
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'

Expand Down Expand Up @@ -126,7 +125,6 @@ def self.action_halt
end

b2.use ClearForwardedPorts
b2.use RemoveTemporaryFiles
b2.use GcPrivateNetworkBridges
b2.use Builtin::Call, Builtin::GracefulHalt, :stopped, :running do |env2, b3|
if !env2[:result]
Expand Down
23 changes: 0 additions & 23 deletions lib/vagrant-lxc/action/remove_temporary_files.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/vagrant-lxc/driver/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def start(options = [])
end

def stop
attach '/sbin/halt' if supports_attach?
attach 'rm -rf /tmp/* && /sbin/halt'
run :stop, '--name', @name
end

Expand Down
2 changes: 1 addition & 1 deletion spec/unit/driver/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
end

it 'runs a /sbin/halt within the container' do
expect(subject).to have_received(:attach).with('/sbin/halt')
expect(subject).to have_received(:attach).with('rm -rf /tmp/* && /sbin/halt')
end

it 'issues a lxc-stop with provided container name' do
Expand Down

0 comments on commit 12c1ba2

Please sign in to comment.