vagrant/templates/guests/gentoo/network_systemd.erb

17 lines
325 B
Plaintext
Raw Normal View History

[Match]
Name=<%= networks[0][:device] %>
[Network]
<%- gateway = nil %>
<%- networks.each do |net| %>
<%- if net[:type] == 'dhcp' %>
DHCP=yes
<%- elsif net[:ip] %>
Address=<%= net[:ip] %>/<%= net[:netmask] %>
<%- end %>
<%- gateway ||= net[:gateway] %>
<%- end %>
<%- if gateway %>
Gateway=<%= gateway %>
<%- end %>