vaguerent/templates/guests/debian/network_dhcp.erb
Philipp Schrader 29040b3920 Make sure debian net post-up never returns an error code.
Inspired by e7dce43af3905a7a986ef6e3402bf6809ab90f16.

I'm using this configuration in my Vagrantfile:
config.vm.network :public_network, use_dhcp_assigned_default_route: true

Every once in a while the secondary network interface would not come
up properly and cause the init scripts to wait for ~ 3 minutes before
giving up and continue with booting.
2015-03-30 12:47:54 -07:00

14 lines
465 B
Plaintext

#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth<%= options[:interface] %>
iface eth<%= options[:interface] %> inet dhcp
<% if !options[:use_dhcp_assigned_default_route] %>
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 dhclient $IFACE
pre-down route add default dev eth0
<% end %>
#VAGRANT-END