Skip to content

Commit

Permalink
Merge pull request hashicorp#1760 from tunix/netctl
Browse files Browse the repository at this point in the history
fixed networking issues of Arch Linux with netctl changes
  • Loading branch information
mitchellh committed Jun 9, 2013
2 parents 6b1a7fc + dbfce67 commit 958efc2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
5 changes: 3 additions & 2 deletions plugins/guests/arch/cap/configure_networks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions templates/guests/arch/network_dhcp.erb
Original file line number Diff line number Diff line change
@@ -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
11 changes: 5 additions & 6 deletions templates/guests/arch/network_static.erb
Original file line number Diff line number Diff line change
@@ -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')

0 comments on commit 958efc2

Please sign in to comment.