From dbfce678bf3b5a7ac267e7263e824034e5d2ac94 Mon Sep 17 00:00:00 2001 From: Alper Kanat Date: Fri, 24 May 2013 00:16:26 +0300 Subject: [PATCH] fixed networking issues of Arch Linux with netctl changes --- plugins/guests/arch/cap/configure_networks.rb | 5 +++-- templates/guests/arch/network_dhcp.erb | 8 ++++---- templates/guests/arch/network_static.erb | 11 +++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/guests/arch/cap/configure_networks.rb b/plugins/guests/arch/cap/configure_networks.rb index 11fda5dedf7..a7cbfd5a3ae 100644 --- a/plugins/guests/arch/cap/configure_networks.rb +++ b/plugins/guests/arch/cap/configure_networks.rb @@ -13,8 +13,9 @@ def self.configure_networks(machine, networks) temp.close machine.communicate.upload(temp.path, "/tmp/vagrant_network") - machine.communicate.sudo("mv /tmp/vagrant_network /etc/network.d/interfaces/eth#{network[:interface]}") - machine.communicate.sudo("netcfg interfaces/eth#{network[:interface]}") + machine.communicate.sudo("ln -sf /dev/null /etc/udev/rules.d/80-net-name-slot.rules") + machine.communicate.sudo("mv /tmp/vagrant_network /etc/netctl/eth#{network[:interface]}") + machine.communicate.sudo("netctl start eth#{network[:interface]}") end end end diff --git a/templates/guests/arch/network_dhcp.erb b/templates/guests/arch/network_dhcp.erb index f7044f07101..cea4e858752 100644 --- a/templates/guests/arch/network_dhcp.erb +++ b/templates/guests/arch/network_dhcp.erb @@ -1,4 +1,4 @@ -CONNECTION='ethernet' -DESCRIPTION='A basic dhcp ethernet connection' -INTERFACE='eth<%= options[:interface] %>' -IP='dhcp' +Description='A basic dhcp ethernet connection' +Interface=eth<%= options[:interface] %> +Connection=ethernet +IP=dhcp diff --git a/templates/guests/arch/network_static.erb b/templates/guests/arch/network_static.erb index 61dfc140bd7..6cf2b9a622f 100644 --- a/templates/guests/arch/network_static.erb +++ b/templates/guests/arch/network_static.erb @@ -1,6 +1,5 @@ -CONNECTION='ethernet' -DESCRIPTION='A basic static ethernet connection' -INTERFACE='eth<%= options[:interface] %>' -IP='static' -ADDR='<%= options[:ip]%>' -NETMASK='<%= options[:netmask] %>' +Connection=ethernet +Description='A basic static ethernet connection' +Interface=eth<%= options[:interface] %> +IP=static +Address=('<%= options[:ip]%>/24')