diff --git a/templates/guests/debian/network_dhcp.erb b/templates/guests/debian/network_dhcp.erb index b518f20e8..d618e8750 100644 --- a/templates/guests/debian/network_dhcp.erb +++ b/templates/guests/debian/network_dhcp.erb @@ -3,11 +3,11 @@ auto <%= options[:device] %> iface <%= options[:device] %> inet dhcp <% if !options[:use_dhcp_assigned_default_route] %> - post-up route del default dev $IFACE || true + post-up ip route del default dev $IFACE || true <% else %> # We need to disable eth0, see GH-2648 - post-up route del default dev <%= options[:root_device] %> || true + post-up ip route del default dev <%= options[:root_device] %> || true post-up dhclient $IFACE - pre-down route add default dev <%= options[:root_device] %> + pre-down ip route add default dev <%= options[:root_device] %> <% end %> #VAGRANT-END diff --git a/test/unit/templates/guests/debian/network_dhcp_test.rb b/test/unit/templates/guests/debian/network_dhcp_test.rb index daffdcea3..24fbfcadf 100644 --- a/test/unit/templates/guests/debian/network_dhcp_test.rb +++ b/test/unit/templates/guests/debian/network_dhcp_test.rb @@ -14,7 +14,7 @@ describe "templates/guests/debian/network_dhcp" do # The contents below are automatically generated by Vagrant. Do not modify. auto eth1 iface eth1 inet dhcp - post-up route del default dev $IFACE || true + post-up ip route del default dev $IFACE || true #VAGRANT-END EOH end @@ -32,9 +32,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 ip route del default dev eth0 || true post-up dhclient $IFACE - pre-down route add default dev eth0 + pre-down ip route add default dev eth0 #VAGRANT-END EOH end