diff --git a/lib/vagrant-libvirt/action.rb b/lib/vagrant-libvirt/action.rb index 665dc53..6aff1bc 100644 --- a/lib/vagrant-libvirt/action.rb +++ b/lib/vagrant-libvirt/action.rb @@ -81,10 +81,8 @@ module VagrantPlugins b2.use Call, IsRunning do |env2, b3| next if !env2[:result] - # VM is running, halt it.. Cleanup running instance data. Now - # only IP address is stored. + # VM is running, halt it. b3.use HaltDomain - b3.use CleanupDataDir end end end @@ -104,9 +102,6 @@ module VagrantPlugins b2.use ConnectLibvirt b2.use DestroyDomain b2.use DestroyNetworks - - # Cleanup running instance data. Now only IP address is stored. - b2.use CleanupDataDir end end end @@ -273,7 +268,6 @@ module VagrantPlugins autoload :HaltDomain, action_root.join("halt_domain") autoload :SuspendDomain, action_root.join("suspend_domain") autoload :ResumeDomain, action_root.join("resume_domain") - autoload :CleanupDataDir, action_root.join("cleanup_data_dir") autoload :ReadState, action_root.join("read_state") autoload :ReadSSHInfo, action_root.join("read_ssh_info") autoload :TimedProvision, action_root.join("timed_provision") diff --git a/lib/vagrant-libvirt/action/cleanup_data_dir.rb b/lib/vagrant-libvirt/action/cleanup_data_dir.rb deleted file mode 100644 index 57b8749..0000000 --- a/lib/vagrant-libvirt/action/cleanup_data_dir.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'log4r' - -module VagrantPlugins - module Libvirt - module Action - class CleanupDataDir - def initialize(app, env) - @logger = Log4r::Logger.new("vagrant_libvirt::action::cleanup_data_dir") - @app = app - end - - def call(env) - # Remove file holding IP address - ip_file_path = env[:machine].data_dir + 'ip' - File.delete(ip_file_path) if File.exists?(ip_file_path) - - @app.call(env) - end - end - end - end -end