diff --git a/network/templates/hostname.if.erb b/network/templates/hostname.if.erb index ccf7b9d..1cc3d52 100644 --- a/network/templates/hostname.if.erb +++ b/network/templates/hostname.if.erb @@ -1,9 +1,10 @@ -<% if @proto == 'dhcp' -%> -dhcp NONE NONE NONE<% @options.each do |val| %> <%= val %><% end %> +<%= @options.join("\n")+"\n" unless @options.empty? -%> +<% if @proto == 'dhcp' %> +dhcp NONE NONE NONE <% elsif @proto == 'none' -%> up <% else -%> -inet <%= @ipaddr %> <%= @netmask %> NONE<% @options.each do |val| %> <%= val %><% end %> +inet <%= @ipaddr %> <%= @netmask %> NONE <% end -%> <% if @ip6addr == 'auto' -%> rtsol