Remove hardcoded interface name from template

This commit is contained in:
Chris Roberts 2017-03-06 14:18:26 -08:00
parent fbe9aeeb0b
commit d862133038
2 changed files with 4 additions and 4 deletions

View File

@ -6,8 +6,8 @@ iface <%= options[:device] %> inet dhcp
post-up route del default dev $IFACE || true
<% else %>
# We need to disable eth0, see GH-2648
post-up route del default dev eth0 || true
post-up route del default dev $IFACE || true
post-up dhclient $IFACE
pre-down route add default dev eth0
pre-down route add default dev $IFACE
<% end %>
#VAGRANT-END

View File

@ -31,9 +31,9 @@ describe "templates/guests/debian/network_dhcp" do
auto eth1
iface eth1 inet dhcp
# We need to disable eth0, see GH-2648
post-up route del default dev eth0 || true
post-up route del default dev $IFACE || true
post-up dhclient $IFACE
pre-down route add default dev eth0
pre-down route add default dev $IFACE
#VAGRANT-END
EOH
end