Run "ip link set [eth1] down" before running "netctl start [eth1]" in Arch guest network configuration

This commit is contained in:
Matt Alexander 2013-12-07 14:22:19 -06:00
parent 5bf07d858e
commit df67d2b44f
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ module VagrantPlugins
# replacing the correct interface name within ruby seems more
# complicted too (I'm far from being a ruby expert though).
machine.communicate.sudo("sed -i \"s/eth#{network[:interface]}/`ip link | sed -n 's/.*:\\s\\(.*\\): <.*/\\1/p' | sed -n #{snth}p`/g\" /etc/netctl/eth#{network[:interface]}")
machine.communicate.sudo("ip link set eth#{network[:interface]} down")
machine.communicate.sudo("netctl start eth#{network[:interface]}")
end
end