From da98ce59b389c04c671820a3cb5354b6c0f8d95b Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 1 Jun 2012 14:26:34 +0200 Subject: [PATCH] Basic fixes to the configure_networks for Arch --- CHANGELOG.md | 1 + plugins/guests/arch/guest.rb | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3813da23..0a6fefd90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/plugins/guests/arch/guest.rb b/plugins/guests/arch/guest.rb index 71186626c..14e9ec43c 100644 --- a/plugins/guests/arch/guest.rb +++ b/plugins/guests/arch/guest.rb @@ -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