Basic fixes to the configure_networks for Arch
This commit is contained in:
parent
f6c33fb4ef
commit
da98ce59b3
|
@ -29,6 +29,7 @@
|
|||
- Files that are included with `vagrant package --include` now properly
|
||||
preserve file attributes on earlier versions of Ruby. [GH-951]
|
||||
- SSH uses LogLevel FATAL so that errors are still shown.
|
||||
- Multiple interfaces now work with Arch linux guests. [GH-957]
|
||||
|
||||
## 1.0.3 (May 1, 2012)
|
||||
|
||||
|
|
|
@ -23,17 +23,16 @@ module VagrantPlugins
|
|||
|
||||
def configure_networks(networks)
|
||||
networks.each do |network|
|
||||
interfaces.add(network[:interface])
|
||||
|
||||
entry = TemplateRenderer.render("guests/arch/network_#{network[:type]}", :options => network)
|
||||
entry = TemplateRenderer.render("guests/arch/network_#{network[:type]}",
|
||||
:options => network)
|
||||
|
||||
temp = Tempfile.new("vagrant")
|
||||
temp.binmode
|
||||
temp.write(entry)
|
||||
temp.close
|
||||
|
||||
vm.channel.upload(temp.path, temp.path)
|
||||
vm.channel.sudo("mv #{temp.path} /etc/network.d/interfaces/eth#{network[:interface]}")
|
||||
vm.channel.upload(temp.path, "/tmp/vagrant_network")
|
||||
vm.channel.sudo("mv /tmp/vagrant_network /etc/network.d/interfaces/eth#{network[:interface]}")
|
||||
vm.channel.sudo("netcfg interfaces/eth#{network[:interface]}")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue