Some fixes with defining new interfaces on Ubuntu
This commit is contained in:
parent
73e9debefb
commit
2d68b284d1
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Reference in New Issue