Some fixes with defining new interfaces on Ubuntu

This commit is contained in:
Mitchell Hashimoto 2010-06-03 11:29:17 -07:00
parent 73e9debefb
commit 2d68b284d1
3 changed files with 4 additions and 5 deletions

View File

@ -38,10 +38,6 @@ module Vagrant
end end
@runner.reload! @runner.reload!
# Sleep to allow VirtualBox to clean things up. There seems
# to be no clean API call to do this.
sleep 1
end end
def create_metadata def create_metadata

View File

@ -76,7 +76,8 @@ module Vagrant
# Remove any previous host only network additions to the # Remove any previous host only network additions to the
# interface file. # interface file.
vm.ssh.execute do |ssh| vm.ssh.execute do |ssh|
ssh.exec!("sudo su -c \"sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/network/interfaces > /etc/network/interfaces\"") ssh.exec!("sudo sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/network/interfaces > /tmp/vagrant-network-interfaces")
ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-interfaces > /etc/network/interfaces'")
end end
end end
@ -86,6 +87,7 @@ module Vagrant
vm.ssh.execute do |ssh| vm.ssh.execute do |ssh|
ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-entry >> /etc/network/interfaces'") ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-entry >> /etc/network/interfaces'")
ssh.exec!("sudo /etc/init.d/networking restart")
end end
end end

View File

@ -107,6 +107,7 @@ Gem::Specification.new do |s|
"templates/chef_server_client.erb", "templates/chef_server_client.erb",
"templates/chef_solo_solo.erb", "templates/chef_solo_solo.erb",
"templates/crontab_entry.erb", "templates/crontab_entry.erb",
"templates/network_entry.erb",
"templates/package_Vagrantfile.erb", "templates/package_Vagrantfile.erb",
"templates/rsync.erb", "templates/rsync.erb",
"templates/ssh_config.erb", "templates/ssh_config.erb",