Merge pull request #8336 from chrisroberts/networking/overhaul
Remove hardcoded interface name from template
This commit is contained in:
commit
21b7214668
|
@ -6,8 +6,8 @@ iface <%= options[:device] %> inet dhcp
|
||||||
post-up route del default dev $IFACE || true
|
post-up route del default dev $IFACE || true
|
||||||
<% else %>
|
<% else %>
|
||||||
# We need to disable eth0, see GH-2648
|
# 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
|
post-up dhclient $IFACE
|
||||||
pre-down route add default dev eth0
|
pre-down route add default dev $IFACE
|
||||||
<% end %>
|
<% end %>
|
||||||
#VAGRANT-END
|
#VAGRANT-END
|
||||||
|
|
|
@ -31,9 +31,9 @@ describe "templates/guests/debian/network_dhcp" do
|
||||||
auto eth1
|
auto eth1
|
||||||
iface eth1 inet dhcp
|
iface eth1 inet dhcp
|
||||||
# We need to disable eth0, see GH-2648
|
# 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
|
post-up dhclient $IFACE
|
||||||
pre-down route add default dev eth0
|
pre-down route add default dev $IFACE
|
||||||
#VAGRANT-END
|
#VAGRANT-END
|
||||||
EOH
|
EOH
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue