diff --git a/plugins/guests/freebsd/cap/configure_networks.rb b/plugins/guests/freebsd/cap/configure_networks.rb index 80267ca23..30d793cfa 100644 --- a/plugins/guests/freebsd/cap/configure_networks.rb +++ b/plugins/guests/freebsd/cap/configure_networks.rb @@ -27,7 +27,7 @@ module VagrantPlugins end entry = TemplateRenderer.render("guests/freebsd/network_#{network[:type]}", - options: network) + options: network, ifname: ifname) # Write the entry to a temporary location temp = Tempfile.new("vagrant") diff --git a/templates/guests/freebsd/network_dhcp.erb b/templates/guests/freebsd/network_dhcp.erb index bee4a47b0..672b01f94 100644 --- a/templates/guests/freebsd/network_dhcp.erb +++ b/templates/guests/freebsd/network_dhcp.erb @@ -1,3 +1,3 @@ #VAGRANT-BEGIN -ifconfig_em<%= options[:interface] %>="DHCP" +ifconfig_em<%= ifname %>="DHCP" #VAGRANT-END diff --git a/templates/guests/freebsd/network_static.erb b/templates/guests/freebsd/network_static.erb index 3b24b1eeb..0edc518cb 100644 --- a/templates/guests/freebsd/network_static.erb +++ b/templates/guests/freebsd/network_static.erb @@ -1,3 +1,3 @@ #VAGRANT-BEGIN -ifconfig_em<%= options[:interface] %>="inet <%= options[:ip] %> netmask <%= options[:netmask] %>" +ifconfig_<%= ifname %>="inet <%= options[:ip] %> netmask <%= options[:netmask] %>" #VAGRANT-END